[Lunar-commits] r16641 - in moonbase/trunk/audio/alsa-utils: . init.d

Jan Eidtmann cmak at lunar-linux.org
Sun Sep 25 02:26:01 UTC 2005


Author: cmak
Date: 2005-09-25 02:26:01 +0000 (Sun, 25 Sep 2005)
New Revision: 16641

Added:
   moonbase/trunk/audio/alsa-utils/init.d/
   moonbase/trunk/audio/alsa-utils/init.d/alsasettings
Log:
...and easier

Added: moonbase/trunk/audio/alsa-utils/init.d/alsasettings
===================================================================
--- moonbase/trunk/audio/alsa-utils/init.d/alsasettings	2005-09-25 02:24:21 UTC (rev 16640)
+++ moonbase/trunk/audio/alsa-utils/init.d/alsasettings	2005-09-25 02:26:01 UTC (rev 16641)
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# alsasettings  Takes care of restoring the ALSA mixer values
+#		2.6.x kernel systems
+#
+# chkconfig: 345 98 12
+# description: Restore ALSA settings on 2.6.x based systems
+
+PATH="$PATH:/usr/sbin:/usr/bin"
+
+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