Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d Add boot script to load mixer settings from /etc/mi...



details:   https://anonhg.NetBSD.org/src/rev/920e82514f29
branches:  trunk
changeset: 532214:920e82514f29
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Jun 02 18:36:46 2002 +0000

description:
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

diffstat:

 etc/rc.d/mixerctl |  27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diffs (31 lines):

diff -r 9d002b79fa85 -r 920e82514f29 etc/rc.d/mixerctl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/rc.d/mixerctl Sun Jun 02 18:36:46 2002 +0000
@@ -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"



Home | Main Index | Thread Index | Old Index