6fb2da4
diff -up apcupsd-3.14.5/platforms/redhat/apcupsd.in.init apcupsd-3.14.5/platforms/redhat/apcupsd.in
6fb2da4
--- apcupsd-3.14.5/platforms/redhat/apcupsd.in.init	2008-11-01 16:03:26.000000000 +0100
6fb2da4
+++ apcupsd-3.14.5/platforms/redhat/apcupsd.in	2009-01-22 10:58:00.429886991 +0100
f85a07e
@@ -3,9 +3,19 @@
602b28d
 # apcupsd      This shell script takes care of starting and stopping
602b28d
 #	       the apcupsd UPS monitoring daemon.
602b28d
 #
602b28d
-# chkconfig: 2345 60 99
602b28d
+# chkconfig: - 60 99
602b28d
 # description: apcupsd monitors power and takes action if necessary
602b28d
 #
f85a07e
+### BEGIN INIT INFO
f85a07e
+# Provides: apcupsd
f85a07e
+# Required-Start: $syslog $local_fs
f85a07e
+# Required-Stop: $syslog $local_fs
f85a07e
+# Default-Start:
f85a07e
+# Default-Stop: 0 1 6
f85a07e
+# Short-Description: apcupsd daemon
f85a07e
+# Description: APC UPS Power Control Daemon for Linux
f85a07e
+### END INIT INFO
f85a07e
+
602b28d
 APCPID=@PIDDIR@/apcupsd.pid
f85a07e
 
6fb2da4
 # Source function libarary
6fb2da4
@@ -30,9 +40,11 @@ case "$1" in
602b28d
        ;;
602b28d
     restart|force-reload)
602b28d
        $0 stop
602b28d
-       sleep 15
602b28d
        $0 start
602b28d
        ;;
602b28d
+    condrestart)
f85a07e
+       [ -f @LOCKDIR@/subsys/apcupsd ] && $0 restart || :
602b28d
+       ;;
602b28d
     reload)
602b28d
        echo "$0: reload not implemented"
602b28d
        exit 3
6fb2da4
@@ -48,7 +60,7 @@ case "$1" in
602b28d
        fi
602b28d
        ;;
602b28d
     *)
602b28d
-       echo "Usage: $0 {start|stop|restart|status}"
602b28d
+       echo "Usage: $0 {start|stop|restart|condrestart|status}"
602b28d
        exit 1
602b28d
        ;;
602b28d
 esac