summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init3
-rw-r--r--init_functions12
2 files changed, 10 insertions, 5 deletions
diff --git a/init b/init
index 19722e4..3a34a45 100644
--- a/init
+++ b/init
@@ -23,7 +23,10 @@ if [ -x /sbin/udevd ]; then
msg ":: Starting udevd..."
echo > /proc/sys/kernel/hotplug
/sbin/udevd --daemon --resolve-names=never
+ export udevd_running=1
msg "done."
+else
+ export udevd_running=0
fi
for cmd in ${CMDLINE}; do
diff --git a/init_functions b/init_functions
index aad406d..c165ff0 100644
--- a/init_functions
+++ b/init_functions
@@ -14,11 +14,13 @@ poll_device() {
else
seconds=5
fi
- echo "Waiting ${seconds} seconds for device ${device} ..."
- while [ ! -b "${device}" -a ! -h "${device}" -a ${seconds} -gt 0 ]; do
- sleep 1
- seconds=$((${seconds}-1))
- done
+ if [ "${udevd_running}" -eq 1 ]; then
+ echo "Waiting ${seconds} seconds for device ${device} ..."
+ while [ ! -b "${device}" -a ! -h "${device}" -a ${seconds} -gt 0 ]; do
+ sleep 1
+ seconds=$((${seconds}-1))
+ done
+ fi
[ -b "${device}" -o -h "${device}" ]
}