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

Moritz Heiber moe at lunar-linux.org
Wed Jun 13 12:56:18 CEST 2007


Author: moe
Date: 2007-06-13 12:56:18 +0200 (Wed, 13 Jun 2007)
New Revision: 24830

Added:
   moonbase/trunk/audio/alsa-utils/40-alsa-mixer.rules
   moonbase/trunk/audio/alsa-utils/BUILD
Removed:
   moonbase/trunk/audio/alsa-utils/alsasettings
Modified:
   moonbase/trunk/audio/alsa-utils/init.d/alsasettings
Log:
Stolen from LFS. Restores sound volumes on the fly (yay for forgetting
to load sound modules).



Added: moonbase/trunk/audio/alsa-utils/40-alsa-mixer.rules
===================================================================
--- moonbase/trunk/audio/alsa-utils/40-alsa-mixer.rules	                        (rev 0)
+++ moonbase/trunk/audio/alsa-utils/40-alsa-mixer.rules	2007-06-13 10:56:18 UTC (rev 24830)
@@ -0,0 +1,3 @@
+# When a sound device is detected, restore the volume settings
+
+KERNEL=="controlC[0-9]*", ACTION=="add", RUN+="/usr/sbin/alsactl restore %n"

Added: moonbase/trunk/audio/alsa-utils/BUILD
===================================================================
--- moonbase/trunk/audio/alsa-utils/BUILD	                        (rev 0)
+++ moonbase/trunk/audio/alsa-utils/BUILD	2007-06-13 10:56:18 UTC (rev 24830)
@@ -0,0 +1,8 @@
+(
+
+  default_build &&
+
+  install -m0755 $SCRIPT_DIRECTORY/40-alsa-mixer.rules \
+                 /etc/udev/rules.d/
+
+) > $C_FIFO 2>&1

Deleted: moonbase/trunk/audio/alsa-utils/alsasettings

Modified: moonbase/trunk/audio/alsa-utils/init.d/alsasettings
===================================================================
--- moonbase/trunk/audio/alsa-utils/init.d/alsasettings	2007-06-13 02:15:21 UTC (rev 24829)
+++ moonbase/trunk/audio/alsa-utils/init.d/alsasettings	2007-06-13 10:56:18 UTC (rev 24830)
@@ -1,18 +1,13 @@
 #!/bin/bash
 #
-# alsasettings  Takes care of restoring the ALSA mixer values
+# alsasettings  Takes care of Storing the ALSA mixer values
 #		2.6.x kernel systems
 #
-# chkconfig: 2345 98 12
-# description: Restore ALSA settings on 2.6.x based systems
+# chkconfig: 345 99 12
+# description: Store 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
@@ -21,13 +16,12 @@
 
 case "$1" in
   start)
-	restore
 	;;
    stop)
 	store
 	;;
       *)
-	echo "Usage: alsasettings {start|stop}"
+	echo "Usage: alsasettings stop"
 	;;
 esac
 



More information about the Lunar-commits mailing list