--- /etc/rc.sysinit.orig 2009-03-10 22:10:02.000000000 +0100 +++ /etc/rc.sysinit 2009-06-29 14:07:23.000000000 +0200 @@ -70,17 +70,34 @@ status "Using static /dev filesystem" true fi -# Load modules from the MODULES array defined in rc.conf -if ! [ "$load_modules" = "off" ]; then - if [ -f /proc/modules ]; then - stat_busy "Loading Modules" - for mod in "${MODULES[@]}"; do +load_modules() { + if [ -f /proc/modules -a $# -gt 1 ]; then + stat_busy "$1" ; shift + for mod in "$@"; do if [ "$mod" = "${mod#!}" ]; then /sbin/modprobe $mod fi done stat_done fi +} + +# Load modules from the MODULES array defined in rc.conf +if ! [ "$load_modules" = "off" ]; then + load_modules "Loading early Modules" "${MODULES[@]}" +fi + +# Trigger udev uevents +if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then + stat_bkgd "Triggering UDev uevents" + /sbin/udevadm trigger & +fi + +if ! [ "$load_modules" = "off" ]; then + + # Load modules from the MODULES2 array defined in rc.conf + load_modules "Loading additional Modules" "${MODULES2[@]}" + if [ -d /proc/acpi ]; then stat_busy "Loading standard ACPI modules" ACPI_MODULES="ac battery button fan processor thermal" @@ -101,11 +118,10 @@ 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)"