diff options
author | Bill Nottingham <notting@redhat.com> | 2000-01-21 06:25:24 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2000-01-21 06:25:24 +0000 |
commit | d75bae45165c4f5c01fc1de13508a510d93e924e (patch) | |
tree | 02b033c9fe72645e9eccdc1568306962f3b53e9f /rc.d/rc.sysinit | |
parent | 857e5632282ab19fda385d69d0a99da3a926c842 (diff) | |
download | initscripts-d75bae45165c4f5c01fc1de13508a510d93e924e.tar initscripts-d75bae45165c4f5c01fc1de13508a510d93e924e.tar.gz initscripts-d75bae45165c4f5c01fc1de13508a510d93e924e.tar.bz2 initscripts-d75bae45165c4f5c01fc1de13508a510d93e924e.tar.xz initscripts-d75bae45165c4f5c01fc1de13508a510d93e924e.zip |
don't load disabled modules
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-x | rc.d/rc.sysinit | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index a8667f9a..6cc0d779 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -259,14 +259,16 @@ if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then fi fi -# load sound modules -if [ -n "$USEMODULES" ]; then - if grep -s -q "^alias sound " /etc/conf.modules ; then - action "Loading sound module" modprobe sound - fi - if grep -s -q "^alias midi " /etc/conf.modules ; then - action "Loading midi module" modprobe midi - fi +# Load sound modules +# +# I think this now qualifies as over-engineered. +alias=`egrep -s "^alias[[:space:]]+sound[[:space:]]+" /etc/conf.modules | awk '{ print $3 }'` +if [ -n "$alias" -a "$alias" != "off" ] ; then + action "Loading sound module ($alias)" modprobe sound +fi +alias=`egrep -s "^alias[[:space:]]+midi[[:space:]]+" /etc/conf.modules | awk '{ print $3 }'` +if [ -n "$alias" -a "$alias" != "off" ]; then + action "Loading midi module ($alias)" modprobe midi fi # Load mixer settings |