]> git.pld-linux.org Git - packages/PowerChutePlus.git/blobdiff - upsd.init
- LSB conformance
[packages/PowerChutePlus.git] / upsd.init
index e3b3e9002bad67b314509d1b2fdf03d5bcf31675..ce6ad07647e543962d7f8e129aef6ecd47ac52b6 100644 (file)
--- a/upsd.init
+++ b/upsd.init
@@ -32,7 +32,7 @@ if [ -r /upsoff.cmd ]; then
        rm -f /upsoff.cmd
 fi
 
-
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
@@ -45,7 +45,6 @@ case "$1" in
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/upsd
        else
                msg_already_running UPSd
-               exit 1
        fi
        ;;
   stop)
@@ -55,25 +54,20 @@ case "$1" in
                rm -f /var/lock/subsys/upsd >/dev/null 2>&1
        else
                msg_not_running UPSd
-               exit 1
        fi      
        ;;
   status)
        status upsd
+       exit $?
        ;;
-  restart|reload)
+  restart|force-reload)
        $0 stop
        $0 start
        exit $?
        ;;
-  force-reload)
-       $0 stop && $0 start
-       exit $?
-       ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
-       exit 1
-       ;;
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
 esac
 
 exit $RETVAL
This page took 0.028016 seconds and 4 git commands to generate.