[arch-projects] [PATCH 1/3] rc.sysinit: allow disabling udevadm settle

Dave Reisner d at falconindy.com
Sat Apr 23 21:01:17 EDT 2011

This seems to cause a lot of grief for people lately. Moreover, most
people don't need it and won't miss it if its disabled. Allow a setting
of 0 to disable this barrier and document it.

Side effect: remove the -o %PPID flag to pidof which won't have any
effect. This is used in /etc/rc.d scripts because they often share the
same name as the service they're controlling. In this case, we're
querying /sbin/udevd from /etc/rc.sysinit, so there's no name clash.
 rc.conf    |    3 ++-
 rc.sysinit |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/rc.conf b/rc.conf
index f09b413..d41c3e4 100644
--- a/rc.conf
+++ b/rc.conf
@@ -39,7 +39,8 @@ VERBOSE="3"
-# Udev settle timeout (default to 30)
+# Udev settle timeout (defaults to 30). A setting of 0 disables waiting for udev
+# to finish processing before continuing with the bootstrap.
 # Scan for FakeRAID (dmraid) Volumes at startup
diff --git a/rc.sysinit b/rc.sysinit
index 070d7cf..76ed3d1 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -93,8 +93,8 @@ if [[ $load_modules != off && -f /proc/modules && $mods ]]; then
 unset mods
-# Wait for udev uevents
-if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
+# Wait for udev uevents. Skip this if the user defines UDEV_TIMEOUT=0
+if { [[ -z $UDEV_TIMEOUT ]] || (( UDEV_TIMEOUT )); } && /bin/pidof /sbin/udevd >/dev/null; then
 	status "Waiting for UDev uevents to be processed" \
 		/sbin/udevadm settle --quiet --timeout=${UDEV_TIMEOUT:-30}

More information about the arch-projects mailing list