aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-04-18 06:59:02 +0000
committerJudd Vinet <judd@archlinux.org>2005-04-18 06:59:02 +0000
commit41e115b5973f6498ce4bfce6fe772b8d0b459700 (patch)
treee301a0757f985d4cf9ce934191235181010dfc99 /rc.sysinit
parentc4a367e15b1bf0c9814a674c0a55084aa714245a (diff)
downloadinitscripts-41e115b5973f6498ce4bfce6fe772b8d0b459700.tar.xz
added a /proc/modules check before running modprobe, just in case the user is running a non-modular kernel
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit16
1 files 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