SOURCES: alsasound.init - use functions to avoid reexec for restart
glen
glen at pld-linux.org
Sun Sep 17 18:10:49 CEST 2006
Author: glen Date: Sun Sep 17 16:10:49 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use functions to avoid reexec for restart
---- Files affected:
SOURCES:
alsasound.init (1.12 -> 1.13)
---- Diffs:
================================================================
Index: SOURCES/alsasound.init
diff -u SOURCES/alsasound.init:1.12 SOURCES/alsasound.init:1.13
--- SOURCES/alsasound.init:1.12 Thu Dec 8 02:02:49 2005
+++ SOURCES/alsasound.init Sun Sep 17 18:10:44 2006
@@ -117,10 +117,8 @@
/sbin/modprobe snd-detect
}
-# See how we were called.
-case "$1" in
- start)
- # Start driver.
+# Start driver.
+start() {
if [ ! -d /proc/asound ]; then
driver_start
if [ -d /proc/asound ]; then
@@ -143,9 +141,10 @@
msg_already_running "ALSA driver"
fi
fi
- ;;
- stop)
- # Stop daemons.
+}
+
+# Stop daemons.
+stop() {
if [ -d /proc/asound ]; then
show "Shutting down sound driver"
busy
@@ -162,11 +161,19 @@
else
msg_not_running "ALSA driver"
fi
+fi
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart|force-reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
status)
# TODO
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/alsasound.init?r1=1.12&r2=1.13&f=u
More information about the pld-cvs-commit
mailing list