- LSB compliance
authorankry <ankry@pld-linux.org>
Sat, 17 May 2003 21:03:35 +0000 (21:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    atd.init -> 1.7

atd.init

index bd02b4b..6a300d4 100644 (file)
--- a/atd.init
+++ b/atd.init
@@ -17,7 +17,7 @@
 # Get service config
 [ -f /etc/sysconfig/atd ] && . /etc/sysconfig/atd
 
-
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
@@ -25,27 +25,33 @@ case "$1" in
        if [ ! -f /var/lock/subsys/atd ]; then
                msg_starting at
                daemon atd
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/atd
        else
                msg_already_running atd
-               exit 1
        fi
-        touch /var/lock/subsys/atd
        ;;
   stop)
-       msg_stopping at
-       killproc atd
-       rm -f /var/lock/subsys/atd
+       if [ -f /var/lock/subsys/atd ]; then
+               msg_stopping at
+               killproc atd
+               rm -f /var/lock/subsys/atd
+       else
+               msg_not_running atd
+       fi
        ;;
-  reload|restart)
+  force-reload|restart)
        $0 stop
        $0 start
+       exit $?
        ;;
   status)
        status atd
+       exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|status}"
-       exit 1
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
 esac
 
-exit 0
+exit $RETVAL
This page took 0.030537 seconds and 4 git commands to generate.