Add boot script to load mixer settings from /etc/mixerctl.conf, if present.

This allows one to preserve mixer settings across reboots by running:
  mixerctl -a >/etc/mixerctl.conf
This commit is contained in:
jmcneill 2002-06-02 18:36:46 +00:00
parent 419bcc2917
commit b055b3e3e4
1 changed files with 27 additions and 0 deletions

27
etc/rc.d/mixerctl Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
#
# $NetBSD: mixerctl,v 1.1 2002/06/02 18:36:46 jmcneill Exp $
#
# PROVIDE: mixerctl
. /etc/rc.subr
name="mixerctl"
start_cmd="mixerctl_start"
stop_cmd=":"
mixerctl_start()
{
if [ -r /etc/mixerctl.conf ]; then
echo "Setting mixerctl variables..."
cat /etc/mixerctl.conf | (
while read setting; do
mixerctl -n -w "$setting"
done
)
fi
}
load_rc_config $name
run_rc_command "$1"