]> git.pld-linux.org Git - packages/aumix.git/blobdiff - aumix.init
- updated
[packages/aumix.git] / aumix.init
index 590d21387896948098ab2f700bae9cdc1678dc1b..7bc510571ffaba982b4500bdc5602a39068b397f 100644 (file)
@@ -10,6 +10,8 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+. /etc/sysconfig/aumix
+
 # See how we were called.
 case "$1" in
   start)
@@ -17,9 +19,13 @@ case "$1" in
        if [ ! -f /var/lock/subsys/aumix ]; then
                show "Setting up sound card mixer"
                busy
-               aumix -f /etc/aumixrc -L >/dev/null
-               RETVAL=$?
-               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/aumix
+               if [ "$AUMIX_AUTO_INIT" = "yes" ]; then
+                       aumix -f /etc/aumixrc -L >/dev/null
+                       RETVAL=$?
+                       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/aumix
+               else
+                       touch /var/lock/subsys/aumix
+               fi
                ok
        else
                nls "Sound card mixer is already set up"
@@ -30,7 +36,9 @@ case "$1" in
        if [ -f /var/lock/subsys/aumix ]; then
                show "Saving sound card mixer's settings"
                busy
-               aumix -f /etc/aumixrc -S
+               if [ "$AUMIX_AUTO_SAVE" = "yes" ]; then
+                       aumix -f /etc/aumixrc -S
+               fi
                rm -f /var/lock/subsys/aumix >/dev/null 2>&1
                ok
        else
@@ -59,27 +67,27 @@ case "$1" in
        if [ $? = 0 ]; then
                lsmod | grep -q "\(sound\|audio\)"
                if [ $? = 0 ]; then
-                       echo "Modular sound card detected."
+                       nls "Modular sound card detected."
                else
-                       echo "Monolithic sound card detected."
+                       nls "Monolithic sound card detected."
                fi
  
                cat /dev/sndstat 2> /dev/null | grep -A 1 "Midi devices:" | grep -q [0-9]:
                if [ $? = 0 ]; then
-                       echo "MIDI device present."
+                       nls "MIDI device present."
                else
                        cat /dev/sndstat >/dev/null 2>&1
                        if [ $? = 0 ]; then
-                               echo "MIDI device not detected."
+                               nls "MIDI device not detected."
                        fi
                fi    
 
        else
-               echo "Sound card not configured."
+               nls "Sound card not configured."
         fi
         ;;
   *)
-       msg_Usage "$0 {start|stop|status|restart|save|restore}"
+       msg_usage "$0 {start|stop|restart|save|restore|status}"
         exit 1
 esac
 
This page took 0.060119 seconds and 4 git commands to generate.