mirror of
https://github.com/outbackdingo/ports.git
synced 2026-01-27 10:20:12 +00:00
33 lines
459 B
Bash
Executable File
33 lines
459 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/alsa: store/restore ALSA mixer levels
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
# location of the alsactl executable
|
|
ALSACTL=/usr/sbin/alsactl
|
|
|
|
case $1 in
|
|
start)
|
|
if [ -f /var/lib/alsa/asound.state ]; then
|
|
msg "Restoring ALSA volume state..."
|
|
$ALSACTL restore
|
|
fi
|
|
;;
|
|
stop)
|
|
msg "Saving ALSA volume state..."
|
|
$ALSACTL store
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
sleep 2
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 [start|stop|restart]"
|
|
;;
|
|
esac
|
|
|
|
# End of file
|