diff options
Diffstat (limited to 'setup/SCO_SV/sbin/soundoff')
-rwxr-xr-x | setup/SCO_SV/sbin/soundoff | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/setup/SCO_SV/sbin/soundoff b/setup/SCO_SV/sbin/soundoff new file mode 100755 index 0000000..2196ab6 --- /dev/null +++ b/setup/SCO_SV/sbin/soundoff @@ -0,0 +1,41 @@ +#!/bin/sh + +. /etc/oss.conf + +if /sbin/modadmin -Q osscore >> /dev/null 2>&1 +then + OK=1 +else + echo OSS not loaded. + exit 0 +fi + +if test ! -f $OSSLIBDIR/etc/installed_drivers +then + echo $OSSLIBDIR/etc/installed_drivers is missing. + exit 1 +fi + +# Save mixer settings automatically if requested +if test -f $OSSLIBDIR/etc/userdefs && /usr/bin/grep -q "autosave_mixer yes" $OSSLIBDIR/etc/userdefs +then + /usr/sbin/savemixer +fi + +for n in `cat $OSSLIBDIR/etc/installed_drivers | sed 's/#.*//'` +do + /sbin/modadmin -U $n > /dev/null 2>&1 +done + +/sbin/modadmin -U osscore > /dev/null 2>&1 + +if /sbin/modadmin -Q osscore >> /dev/null 2>&1 +then + OK=1 +else + exit 0 +fi + +echo Cannot unload the OSS driver modules + +exit 0 |