--- git/rc.sysinit 2009-08-05 22:49:01.418700303 +0200 +++ new/rc.sysinit 2009-08-05 23:07:20.805381560 +0200 @@ -68,6 +68,23 @@ status "Using static /dev filesystem" true fi +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_busy "Triggering UDev uevents" @@ -75,17 +92,10 @@ stat_done 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 - if [ "$mod" = "${mod#!}" ]; then - /sbin/modprobe $mod - fi - done - stat_done - fi + # 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"