Blob Blame History Raw
--- apcupsd-3.14.1/platforms/redhat/apcupsd.in.init	2007-04-23 17:35:33.000000000 -0600
+++ apcupsd-3.14.1/platforms/redhat/apcupsd.in	2007-08-02 09:05:48.000000000 -0600
@@ -3,7 +3,7 @@
 # apcupsd      This shell script takes care of starting and stopping
 #	       the apcupsd UPS monitoring daemon.
 #
-# chkconfig: 2345 60 99
+# chkconfig: - 60 99
 # description: apcupsd monitors power and takes action if necessary
 #
 APCPID=@PIDDIR@/apcupsd.pid
@@ -44,9 +44,11 @@
        ;;
     restart|force-reload)
        $0 stop
-       sleep 15
        $0 start
        ;;
+    condrestart)
+       [ -f /var/lock/subsys/ypbind ] && $0 restart || :
+       ;;
     reload)
        echo "$0: reload not implemented"
        exit 3
@@ -62,7 +64,7 @@
        fi
        ;;
     *)
-       echo "Usage: $0 {start|stop|restart|status}"
+       echo "Usage: $0 {start|stop|restart|condrestart|status}"
        exit 1
        ;;
 esac