]> git.pld-linux.org Git - packages/aumix.git/commitdiff
- Init script for aumix (saves sound card settings on shutdown and restores
authormkochano <mkochano@pld-linux.org>
Mon, 10 Apr 2000 20:14:35 +0000 (20:14 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  them on start). This script is for OSS/Free driver.

Changed files:
    aumix.init -> 1.1

aumix.init [new file with mode: 0644]

diff --git a/aumix.init b/aumix.init
new file mode 100644 (file)
index 0000000..97b8c1d
--- /dev/null
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# aumix                Sound mixer setup.
+#
+# chkconfig:    345  85 15
+#
+# description: Saves sound mixer's settings on system shutdown and restores
+#              them on system startup.
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       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
+               ok
+       else
+               # show "%s service is already running." <service>
+               nls "Sound card mixer is already set up"
+               exit 1
+       fi
+        ;;
+  stop)
+        # Stop daemons.
+       if [ -f /var/lock/subsys/aumix ]; then
+               show "Saving sound card mixer's settings"
+               busy
+               aumix -f /etc/aumixrc -S
+               rm -f /var/lock/subsys/aumix >/dev/null 2>&1
+               ok
+       else
+               nls "Sound card mixer hasn't been set up"
+               exit 1
+       fi      
+        ;;
+  restart)
+        $0 stop
+       $0 start
+        ;;
+  save)
+       show "Saving sound card mixer's settings"
+       busy
+       aumix -f /etc/aumixrc -S
+       ok
+       ;;
+  restore)
+       show "Setting up sound card mixer"
+       busy
+       aumix -f /etc/aumixrc -L >/dev/null
+       ok
+       ;;
+  status)
+       status aumix
+       exit $?
+        ;;
+  *)
+       msg_Usage "$0 {start|stop|status|restart|save|restore}"
+        exit 1
+esac
+
+exit $RETVAL
This page took 0.067531 seconds and 4 git commands to generate.