- cleaning
authorankry <ankry@pld-linux.org>
Sun, 11 May 2003 15:15:00 +0000 (15:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    upsd.init -> 1.2

upsd.init

index 9fbca2c57366da69dbe77e6f203d5884cd197914..e3b3e9002bad67b314509d1b2fdf03d5bcf31675 100644 (file)
--- a/upsd.init
+++ b/upsd.init
@@ -9,8 +9,8 @@
 #  msamson  04Oct99 Incorporated standard init fixes from Redhat 
 #                   (pjones@redhat.com)
 #
-# chkconfig: 2345 98 92
-# description: Uninterruptable Power Supply Monitoring Daemon
+# chkconfig:   2345 98 92
+# description: Uninterruptable Power Supply Monitoring Daemon
 #
 #
 
@@ -32,6 +32,7 @@ if [ -r /upsoff.cmd ]; then
        rm -f /upsoff.cmd
 fi
 
+
 # See how we were called.
 case "$1" in
   start)
@@ -41,11 +42,9 @@ case "$1" in
                cd $PWRCHUTE
                daemon upsd
                RETVAL=$?
-               if [ $RETVAL -eq 0 ]; then
-                       touch /var/lock/subsys/upsd
-               fi
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/upsd
        else
-               msg_Already_Running UPSd
+               msg_already_running UPSd
                exit 1
        fi
        ;;
@@ -55,21 +54,25 @@ case "$1" in
                killproc upsd
                rm -f /var/lock/subsys/upsd >/dev/null 2>&1
        else
-               msg_Not_Running UPSd
+               msg_not_running UPSd
                exit 1
        fi      
        ;;
   status)
        status upsd
        ;;
-  reload|force-reload|restart)
+  restart|reload)
        $0 stop
        $0 start
        exit $?
        ;;
+  force-reload)
+       $0 stop && $0 start
+       exit $?
+       ;;
   *)
-       msg_Usage "$0 {start|stop|status|restart|reload|force-reload}"
-        exit 1
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       exit 1
        ;;
 esac
 
This page took 0.099327 seconds and 4 git commands to generate.