[Lunar-commits] CVS: moonbase/audio/alsa-utils alsasettings, 1.1, 1.2

Moritz Heiber moe at lunar-linux.org
Mon Feb 21 13:34:40 UTC 2005


Update of /var/cvs/lunar/moonbase/audio/alsa-utils
In directory espresso.foo-projects.org:/tmp/cvs-serv30925

Modified Files:
	alsasettings 
Log Message:
I'm lame


Index: alsasettings
===================================================================
RCS file: /var/cvs/lunar/moonbase/audio/alsa-utils/alsasettings,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- alsasettings	21 Feb 2005 11:05:30 -0000	1.1
+++ alsasettings	21 Feb 2005 13:34:38 -0000	1.2
@@ -3,14 +3,31 @@
 # alsasettings  Takes care of restoring the ALSA mixer values
 #		2.6.x kernel systems
 #
-# chkconfig: 2345 98 12
+# chkconfig: 345 98 12
 # description: Restore ALSA settings on 2.6.x based systems
-# processname: alsactl
 
-if [ "$1" == "start" ]; then
-  ARGS="restore"
-else
-  ARGS="store"
-fi
+PATH="$PATH:/usr/sbin:/usr/bin"
 
-. /lib/lsb/init-functions
+function restore() {
+  echo "Restoring ALSA mixer settings..."
+  alsactl restore
+}
+
+function store() {
+  echo "Storing ALSA mixer settings..."
+  alsactl store
+  amixer set Master mute &> /dev/null
+}
+
+case "$1" in
+  start)
+	restore
+	;;
+   stop)
+	store
+	;;
+      *)
+	echo "Usage: alsasettings {start|stop}"
+esac
+
+exit 0



More information about the Lunar-commits mailing list