]> git.pld-linux.org Git - packages/cpqarrayd.git/commitdiff
- use functions
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 26 Nov 2007 08:24:30 +0000 (08:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cpqarrayd.init -> 1.5

cpqarrayd.init

index 6bc67f72c1528c8e338c6dd830010725a020b459..e63d8a0510a13c68e4d02699359ab01959757e21 100644 (file)
@@ -17,10 +17,7 @@ if [ -f /etc/sysconfig/cpqarrayd ]; then
        . /etc/sysconfig/cpqarrayd
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-start)
+start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/cpqarrayd ]; then
                msg_starting cpqarrayd
@@ -33,8 +30,9 @@ start)
        else
                msg_already_running cpqarrayd
        fi
-       ;;
-stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/cpqarrayd ]; then
                # Stop daemons.
                msg_stopping cpqarrayd
@@ -43,11 +41,20 @@ stop)
        else
                msg_not_running cpqarrayd
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+start)
+       start
+       ;;
+stop)
+       stop
        ;;
 restart|force-reload)
-       $0 stop
-       $0 start
-       RETVAL=$?
+       stop
+       start
        ;;
 status)
        status cpqarrayd
This page took 0.203631 seconds and 4 git commands to generate.