Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 2d6687894bb7723cfdccb4d94b3ee3f8 > files > 5

apcupsd-3.14.10-4.mga3.src.rpm

--- platforms/mandrake/apcupsd.in	2008-12-20 14:14:31.000000000 +0100
+++ platforms/mandrake/apcupsd.in.oden	2008-12-20 14:23:13.000000000 +0100
@@ -6,9 +6,17 @@
 # chkconfig: 2345 60 99
 # description: apcupsd monitors power and takes action if necessary
 #
-APCPID=@PIDDIR@/apcupsd.pid
 
-DISTVER=`cat /etc/mandrake-release | grep release | cut -f 5 -d ' '`
+### BEGIN INIT INFO
+# Provides: apcupsd
+# Required-Start: $network $syslog
+# Required-Stop: $network $syslog
+# Default-Start: 2 3 5
+# Default-Stop:
+# Description: Start the apcupsd daemon
+### END INIT INFO
+
+APCPID=@PIDDIR@/apcupsd.pid
 
 # Source function libarary
 . /etc/rc.d/init.d/functions
@@ -41,11 +49,7 @@
 	  fi
        fi
        echo -n "Starting UPS monitoring:" 
-       if [ "${DISTVER}" = "5.2" ] ; then
-	  @sbindir@/apcupsd -f @sysconfdir@/apcupsd.conf
-       else
-	  @sbindir@/apcupsd -f @sysconfdir@/apcupsd.conf && success || failure
-       fi
+       @sbindir@/apcupsd -f @sysconfdir@/apcupsd.conf && success || failure
        echo
        touch @LOCKDIR@/subsys/apcupsd
        ;;