Author: glen                         Date: Sun Sep 17 22:28:38 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions to avoid reexec for restart

---- Files affected:
SOURCES:
   powernowd.init (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/powernowd.init
diff -u SOURCES/powernowd.init:1.3 SOURCES/powernowd.init:1.4
--- SOURCES/powernowd.init:1.3  Sun Sep 17 18:17:31 2006
+++ SOURCES/powernowd.init      Mon Sep 18 00:28:33 2006
@@ -16,10 +16,7 @@
 
 SYSDIR="/sys/devices/system/cpu/cpu0/cpufreq"
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # Start daemons.
        if [ ! -f /var/lock/subsys/powernowd ]; then
         LOADMODULE="no"
@@ -51,8 +48,9 @@
        else
                msg_already_running powernowd
        fi
-       ;;
-  stop)
+}
+
+stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/powernowd ]; then
                msg_stopping powernowd
@@ -61,6 +59,16 @@
        else
                msg_not_running powernowd
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   reload|force-reload)
        if [ -f /var/lock/subsys/powernowd ]; then
@@ -73,9 +81,8 @@
        fi
        ;;
   restart)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   status)
        status powernowd
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/powernowd.init?r1=1.3&r2=1.4&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to