diff options
author | Kurt J. Bosch <kujub@quantentunnel.de> | 2009-06-26 10:47:08 -0700 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-06-26 10:47:08 -0700 |
commit | fb1177118b663da6b45021cb0ebdb40741047bac (patch) | |
tree | 94dae2c6befca3677a0aedc7f4db317fdfc0c49d /rc.sysinit | |
parent | 2b94f1cf826ddbb61fa840c4175bb9c681eea0be (diff) | |
download | initscripts-fb1177118b663da6b45021cb0ebdb40741047bac.tar.xz |
Trigger uevents earlier
Backgrounding the udev uevent triggering right after the launch
of the udev daemon allows us to do more in parallel before we wait
for uevents to complete (udevadm settle). This should speed up boot
Ref: FS#12706
Idea-from: Vahid Hamidullah <vh22@njit.edu>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-x | rc.sysinit | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -69,6 +69,13 @@ else status "Using static /dev filesystem" true fi +# Trigger udev uevents +if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then + stat_busy "Triggering UDev uevents" + /sbin/udevadm trigger & + stat_done +fi + # Load modules from the MODULES array defined in rc.conf if ! [ "$load_modules" = "off" ]; then if [ -f /proc/modules ]; then @@ -100,11 +107,10 @@ if ! [ "$load_modules" = "off" ]; then fi fi -# run udev uevents +# Wait for udev uevents if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then - stat_busy "Loading UDev uevents" + stat_busy "Waiting for UDev uevents to be processed" udevstart="$(/bin/date +%s%0N)" - /sbin/udevadm trigger /sbin/udevadm settle stat_done udevend="$(/bin/date +%s%0N)" |