Author: glen                         Date: Tue Feb 12 08:55:46 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   specter.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/specter.init
diff -u SOURCES/specter.init:1.1 SOURCES/specter.init:1.2
--- SOURCES/specter.init:1.1    Tue Feb 12 02:06:49 2008
+++ SOURCES/specter.init        Tue Feb 12 09:55:41 2008
@@ -15,15 +15,12 @@
        . /etc/sysconfig/specter
 fi
 
-RETVAL=0
-# See how we were called.
 CONFIGS=/etc/specter.conf
 if [ "${MULTIPLE}" == "YES" ]; then
        CONFIGS="$CONFIGS /etc/specter/*.conf"
 fi
 
-case "$1" in
-  start)
+start() {
        # Check if the service is already running?
        for i in $CONFIGS; do
                bname=$(basename $i .conf)
@@ -37,8 +34,9 @@
                fi
                touch /var/lock/subsys/specter
        done
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/specter ]; then
                msg_stopping specter
                killproc specter
@@ -46,15 +44,24 @@
        else
                msg_not_running specter
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   status)
        status specter
        exit $?
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   *)
        msg_usage "$0 {start|stop|restart|force-reload|status}"
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/specter.init?r1=1.1&r2=1.2&f=u

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

Reply via email to