diff options
author | Judd Vinet <judd@archlinux.org> | 2005-04-18 06:59:02 +0000 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2005-04-18 06:59:02 +0000 |
commit | 41e115b5973f6498ce4bfce6fe772b8d0b459700 (patch) | |
tree | e301a0757f985d4cf9ce934191235181010dfc99 /rc.sysinit | |
parent | c4a367e15b1bf0c9814a674c0a55084aa714245a (diff) | |
download | initscripts-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-x | rc.sysinit | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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 |