[Lunar-commits] CVS: moonbase/audio/alsa-utils BUILD, NONE, 1.1 PRE_REMOVE, NONE, 1.1 alsasettings, NONE, 1.1 DETAILS, 1.23, 1.24 POST_INSTALL, 1.6, 1.7 POST_REMOVE, 1.1, NONE

Moritz Heiber moe at lunar-linux.org
Mon Feb 21 11:05:33 UTC 2005


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

Modified Files:
	DETAILS POST_INSTALL 
Added Files:
	BUILD PRE_REMOVE alsasettings 
Removed Files:
	POST_REMOVE 
Log Message:
It's all new and shiny and better and wipes your ass and ..
Well, at least it's less hacky and uses lunar's build-in
init.d routines now.

* Moved the alsasettings script into the script's directory
* Completely rewrote the alsasettings script to work with
  the init-functions
* Better install tracking
* We don't leave anything behind


--- NEW FILE: BUILD ---
(
  default_build &&

  install -o root -g root -m711 \
	$SCRIPT_DIRECTORY/alsasettings /etc/init.d/

) > $C_FIFO 2>&1

--- NEW FILE: PRE_REMOVE ---
# We need to remove the settings script

chkconfig --del alsasettings

--- NEW FILE: alsasettings ---
#!/bin/bash
#
# alsasettings  Takes care of restoring the ALSA mixer values
#		2.6.x kernel systems
#
# chkconfig: 2345 98 12
# description: Restore ALSA settings on 2.6.x based systems
# processname: alsactl

if [ "$1" == "start" ]; then
  ARGS="restore"
else
  ARGS="store"
fi

. /lib/lsb/init-functions

Index: DETAILS
===================================================================
RCS file: /var/cvs/lunar/moonbase/audio/alsa-utils/DETAILS,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- DETAILS	13 Jan 2005 18:01:45 -0000	1.23
+++ DETAILS	21 Feb 2005 11:05:29 -0000	1.24
@@ -1,11 +1,9 @@
           MODULE=alsa-utils
          VERSION=1.0.8
           SOURCE=$MODULE-$VERSION.tar.bz2
-	 SOURCE2=alsasettings
    SOURCE_URL[0]=ftp://ftp.alsa-project.org/pub/utils/
    SOURCE_URL[1]=ftp://ftp.silug.org/pub/alsa/utils/
    SOURCE_URL[2]=ftp://ftp.sunet.se/pub/Linux/alsa/utils/
-     SOURCE2_URL=$PATCH_URL/
       SOURCE_VFY=sha1:5a7a6e3fda4d92e8461f22520859dfd02c479ee5
         WEB_SITE=http://www.alsa-project.org/
          ENTERED=20010922

Index: POST_INSTALL
===================================================================
RCS file: /var/cvs/lunar/moonbase/audio/alsa-utils/POST_INSTALL,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- POST_INSTALL	12 Feb 2005 19:25:08 -0000	1.6
+++ POST_INSTALL	21 Feb 2005 11:05:30 -0000	1.7
@@ -1,40 +1,15 @@
-if  [  !  -f  /etc/asound.state  ];  then
-
-  alsactl  store
-  echo  "Mixer setting saved."
-  echo  "You can save the default ALSA mixer levels"
-  echo  "at anytime as root by running"
-  echo  "# alsactl store"
-
-fi
-
-if module_installed linux-2.6 ; then	
-
-   if ! [ -e /etc/init.d/alsasettings  ];  then
-      cp  $SOURCE_CACHE/alsasettings  /etc/init.d
-      chmod +x /etc/init.d/alsasettings
-      rm -f /etc/rcS.d/S98alsasettings
-      ln -s /etc/init.d/alsasettings /etc/rcS.d/S98alsasettings
-   fi
-
-   if [ ! -e /etc/rcS.d/S98alsasettings ]; then
-      ln -s /etc/init.d/alsasettings /etc/rcS.d/S98alsasettings
-   fi
-
-   if [ ! -e /etc/rc0.d/K12alsasettings ]; then
-      ln -s /etc/init.d/alsasettings /etc/rc0.d/K12alsasettings
-   fi
-
-   if [ ! -e /etc/rc6.d/K12alsasettings ]; then
-      ln -s /etc/init.d/alsasettings /etc/rc6.d/K12alsasettings
-   fi
+# Store settings and run chkconfig
+ASOUND_FILE="/etc/asound.state"
 
-   if [ ! -e /etc/rc1.d/K12alsasettings ]; then
-      ln -s /etc/init.d/alsasettings /etc/rc1.d/K12alsasettings
-   fi
+if [ ! -f $ASOUND_FILE ]; then
+    alsactl  store
 
-   if [ ! -e /etc/rc2.d/K12alsasettings ]; then
-      ln -s /etc/init.d/alsasettings /etc/rc2.d/K12alsasettings
-   fi
+    message  "Mixer setting saved to $ASOUND_FILE"
+    message  "You can save the default ALSA mixer levels"
+    message  "as root anytime by running:"
+    message  "# alsactl store"
+fi &&
 
+if [ `uname -r | cut -d. -f2` -ge 6 ]; then
+  chkconfig --add alsasettings
 fi

--- POST_REMOVE DELETED ---



More information about the Lunar-commits mailing list