1#!/bin/sh 2# 3# $DragonFly: src/etc/rc.d/mixer,v 1.5 2004/11/08 18:33:17 joerg Exp $ 4# 5 6# PROVIDE: mixer 7# REQUIRE: aftermountlkm 8 9. /etc/rc.subr 10 11name="mixer" 12rcvar=`set_rcvar` 13start_cmd="mixer_start" 14stop_cmd="mixer_stop" 15mixer_conf=/etc/mixer.conf 16 17mixer_start() 18{ 19 if [ -r $mixer_conf ]; then 20 echo "Loading mixer settings" 21 cat $mixer_conf| xargs mixer 22 fi 23} 24 25mixer_stop() 26{ 27 [ -z "$mixer_conf" ] && return 28 if [ -w $mixer_conf -o \( ! -e $mixer_conf -a -w `dirname $mixer_conf` \) ]; then 29 echo "Storing mixer settings" 30 mixer -s > $mixer_conf 31 fi 32} 33 34load_rc_config $name 35run_rc_command "$1" 36