Subject: tweaking mixer knobs at boot
To: None <netbsd-users@netbsd.org>
From: Amitai Schlair <ays@eecs.cwru.edu>
List: netbsd-users
Date: 10/24/2000 13:34:07
What is the correct way to frob mixer settings at boot time? I didn't see
anything, so I did up an /etc/rc.d/mixerctl:

#!/bin/sh

# PROVIDE: mixerctl
# REQUIRE: LOGIN

. /etc/rc.subr

name="mixerctl"
start_cmd="mixerctl_start"
stop_cmd=":"

mixerctl_start()
{
    if [ -r /etc/mixerctl.conf ]; then
        echo "Setting mixerctl variables:"
        mixerctl -w `sed -e "s/#.*$//" -e "/^$/d" /etc/mixerctl.conf`
    fi
}

load_rc_config $name
run_rc_command "$1"