From 41e115b5973f6498ce4bfce6fe772b8d0b459700 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Mon, 18 Apr 2005 06:59:02 +0000 Subject: added a /proc/modules check before running modprobe, just in case the user is running a non-modular kernel --- rc.sysinit | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index a64fc1a..b928af6 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -152,13 +152,15 @@ if [ "$CONSOLEFONT" != "" ]; then fi # Load modules from the MODULES array defined in rc.conf -stat_busy "Loading Modules" -for mod in "${MODULES[@]}"; do - if [[ `echo $mod | grep '^[^\!]' | wc -l` -eq 1 ]]; then - /sbin/modprobe $mod - fi -done -stat_done +if [ -f /proc/modules ]; then + stat_busy "Loading Modules" + for mod in "${MODULES[@]}"; do + if [[ `echo $mod | grep '^[^\!]' | wc -l` -eq 1 ]]; then + /sbin/modprobe $mod + fi + done + stat_done +fi # Now that modules are loaded, try to mount /proc/bus/usb [ "`grep usbfs /proc/filesystems`" ] && mount -t usbfs none /proc/bus/usb -- cgit v1.2.3