Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 9e48fa133c5eef75e487d593afab755d > files > 20

apm-scripts-0.1-3mdk.i586.rpm

#!/bin/sh
# -*- Mode: shell-script -*-

[ -e /etc/sysconfig/apmd ] && . /etc/sysconfig/apmd

# Unload sound modules if necessary
if [ "$RESTORESOUND" = "yes" -o "$RESTORESOUNDPROGS" = "yes" ]; then
    # soundoff is from the commercial OSS drivers, don't worry
    # if you don't have it. (Nobody sane does ;) ).
    [ -x /usr/bin/soundoff ] && /usr/bin/soundoff
    [ -x /usr/sbin/soundoff ] && /usr/sbin/soundoff
    [ -x /usr/local/bin/soundoff ] && /usr/local/bin/soundoff
    [ -x /usr/local/sbin/soundoff ] && /usr/local/sbin/soundoff
    rm -rf /var/run/apm-soundmodules
    for m in $SOUNDMODULES; do
	if lsmod |grep -q "^$m " &>/dev/null; then
	    rmmod $m
	    echo $m >>/var/run/apm-soundmodules
	fi
    done
fi
sync