aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-12-12 08:01:30 +0000
committerBill Nottingham <notting@redhat.com>2000-12-12 08:01:30 +0000
commit2015a690a9835b838f895e2060e6574ac1a7b031 (patch)
tree89766c2717849ccc3c236dc7b212a51c394be48e /rc.d/rc.sysinit
parent99bea6c770fed16154ee3ab7dfd2929af3d68e56 (diff)
downloadinitscripts-2015a690a9835b838f895e2060e6574ac1a7b031.tar
initscripts-2015a690a9835b838f895e2060e6574ac1a7b031.tar.gz
initscripts-2015a690a9835b838f895e2060e6574ac1a7b031.tar.bz2
initscripts-2015a690a9835b838f895e2060e6574ac1a7b031.tar.xz
initscripts-2015a690a9835b838f895e2060e6574ac1a7b031.zip
only load modules for which persistent DMA buffers are necessary
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit29
1 files changed, 12 insertions, 17 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 103471c5..04243a4f 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -354,28 +354,23 @@ if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
fi
fi
-# Load sound modules
-#
-# I think this now qualifies as over-engineered.
-RETURN=0
-alias=`egrep -s "^alias[[:space:]]+sound[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`
-if [ -n "$alias" -a "$alias" != "off" ] ; then
+# Load sound modules iff they need persistent DMA buffers
+if grep -q "options sound dmabuf=1" /etc/modules.conf 2>/dev/null ; then
+ RETURN=0
+ alias=`egrep -s "^alias[[:space:]]+sound[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`
+ if [ -n "$alias" -a "$alias" != "off" ] ; then
action "Loading sound module ($alias): " modprobe $alias
RETURN=$?
-fi
-alias=`egrep -s "^alias[[:space:]]+sound-slot-0[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`
-if [ -n "$alias" -a "$alias" != "off" ] ; then
+ fi
+ alias=`egrep -s "^alias[[:space:]]+sound-slot-0[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`
+ if [ -n "$alias" -a "$alias" != "off" ] ; then
action "Loading sound module ($alias): " modprobe $alias
RETURN=$?
-fi
-alias=`egrep -s "^alias[[:space:]]+midi[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`
-if [ -n "$alias" -a "$alias" != "off" ]; then
- action "Loading midi module ($alias): " modprobe $alias
-fi
-
-# Load mixer settings
-if grep -q "\(sparcaudio\|sound\)" /proc/devices 2>/dev/null && [ $RETURN -eq 0 -a -f /etc/.aumixrc -a -x /bin/aumix-minimal ]; then
+ fi
+ # Load mixer settings
+ if grep -q "\(sparcaudio\|sound\)" /proc/devices 2>/dev/null && [ $RETURN -eq 0 -a -f /etc/.aumixrc -a -x /bin/aumix-minimal ]; then
action "Loading mixer settings: " /bin/aumix-minimal -f /etc/.aumixrc -L
+ fi
fi
if [ -f /proc/sys/kernel/modprobe ]; then