Author: glen                         Date: Sun Oct  1 21:33:28 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions; fix force-reload

---- Files affected:
SOURCES:
   haldaemon.init (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SOURCES/haldaemon.init
diff -u SOURCES/haldaemon.init:1.8 SOURCES/haldaemon.init:1.9
--- SOURCES/haldaemon.init:1.8  Tue May 30 13:40:40 2006
+++ SOURCES/haldaemon.init      Sun Oct  1 23:33:23 2006
@@ -16,9 +16,7 @@
 # Include debbuging statment
 . /etc/sysconfig/hald
 
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # First step: check for running messagebus service
        if [ -f /var/lock/subsys/messagebus ]; then
                # Check if the service is already running?
@@ -38,8 +36,9 @@
        else
                msg_not_running messagebus
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/haldaemon ]; then
                # Stop daemons.
                msg_stopping haldaemon
@@ -48,13 +47,21 @@
        else
                msg_not_running haldaemon
        fi
+}
+
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   restart)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
-  reload)
+  reload|force-reload)
        if [ -f /var/lock/subsys/haldaemon ]; then
                msg_reloading haldaemon
                killproc hald -HUP
@@ -64,15 +71,6 @@
                RETVAL=7
        fi
        ;;
-  force-reload)
-       # if program allows reloading without stopping
-       $0 reload
-
-       # or if it doesn't
-       $0 restart
-
-       exit $?
-       ;;
   status)
        status hald
        RETVAL=$?
@@ -85,4 +83,4 @@
 exit $RETVAL
 
 # This must be last line !
-# vi:syntax=sh:tw=78:ts=8:sw=4
+# vi:syntax=sh
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/haldaemon.init?r1=1.8&r2=1.9&f=u

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

Reply via email to