summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/etc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'initramfs/initrd-stuff/etc/functions')
-rw-r--r--initramfs/initrd-stuff/etc/functions24
1 files changed, 24 insertions, 0 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index b27dfc66..aa0a8225 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -32,6 +32,7 @@ udev_hotplug () {
:
}
+
#############################################################################
# generate events with the sysfs trigger
trigger_device_events () {
@@ -61,6 +62,29 @@ trigger_device_events () {
}
#############################################################################
+# mini udev of busybox or distro specific udev_hotplug
+runudev () {
+if [ -x /bin/mdev ] ; then
+ # simple shell daemon which runs for 100 seconds and stops if hwautocfg is
+ # completed
+ #miniudev () {
+ # local maxwait=100
+ # local count=0
+ # while [ ! -e /tmp/hwcfg ] ; do
+ mdev -s
+ # sleep 1
+ # count=`expr $count + 1`
+ # [ $count -gt $maxwait ] && return 0
+ # done
+ #}
+ #miniudev &
+else
+ udev_hotplug
+fi
+echo "Started udev"
+}
+
+#############################################################################
# produce error message and if $2 is empty run (debug) shell
error () {
local e_msg="$1"