#!/bin/bash . /etc/rc.conf . /etc/rc.d/functions PID=`pidof -o %PPID /usr/sbin/alsactl restore` case "$1" in start) stat_busy "Restoring mixer levels" [ -z "$PID" ] && /usr/sbin/alsactl restore if [ $? -gt 0 ]; then stat_fail else echo $PID > /var/run/mixer.pid add_daemon mixer stat_done fi ;; stop) stat_busy "Saving mixer levels" [ -z "$PID" ] && /usr/sbin/alsactl store if [ $? -gt 0 ]; then stat_fail else stat_done fi ;; *)echo "usage: $0 {start|stop}" esac exit 0