diff -up apcupsd-3.14.3/platforms/redhat/apcupsd.in.init apcupsd-3.14.3/platforms/redhat/apcupsd.in
--- apcupsd-3.14.3/platforms/redhat/apcupsd.in.init 2007-04-24 01:35:33.000000000 +0200
+++ apcupsd-3.14.3/platforms/redhat/apcupsd.in 2008-05-28 09:05:39.000000000 +0200
@@ -3,9 +3,19 @@
# 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
#
+### BEGIN INIT INFO
+# Provides: apcupsd
+# Required-Start: $syslog $local_fs
+# Required-Stop: $syslog $local_fs
+# Default-Start:
+# Default-Stop: 0 1 6
+# Short-Description: apcupsd daemon
+# Description: APC UPS Power Control Daemon for Linux
+### END INIT INFO
+
APCPID=@PIDDIR@/apcupsd.pid
if test -f /etc/whitebox-release ; then
@@ -44,9 +54,11 @@ case "$1" in
;;
restart|force-reload)
$0 stop
- sleep 15
$0 start
;;
+ condrestart)
+ [ -f @LOCKDIR@/subsys/apcupsd ] && $0 restart || :
+ ;;
reload)
echo "$0: reload not implemented"
exit 3
@@ -62,7 +74,7 @@ case "$1" in
fi
;;
*)
- echo "Usage: $0 {start|stop|restart|status}"
+ echo "Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
;;
esac