SPECS: apcupsd.spec - use %service

dzeus dzeus at pld-linux.org
Fri Mar 17 21:07:41 CET 2006


Author: dzeus                        Date: Fri Mar 17 20:07:41 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service

---- Files affected:
SPECS:
   apcupsd.spec (1.73 -> 1.74) 

---- Diffs:

================================================================
Index: SPECS/apcupsd.spec
diff -u SPECS/apcupsd.spec:1.73 SPECS/apcupsd.spec:1.74
--- SPECS/apcupsd.spec:1.73	Tue Mar  7 17:21:24 2006
+++ SPECS/apcupsd.spec	Fri Mar 17 21:07:36 2006
@@ -24,13 +24,14 @@
 BuildRequires:	autoconf
 BuildRequires:	automake
 %{?with_snmp:BuildRequires:	net-snmp-devel}
+BuildRequires:	rpmbuild(macros) >= 1.268
 Requires(post):	fileutils
 Requires(post,preun):	/sbin/chkconfig
 Requires:	rc-scripts
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_sysconfdir	/etc/apcupsd
-%define         _cgidir        /home/services/httpd/cgi-bin
+%define		_cgidir		/home/services/httpd/cgi-bin
 
 %description
 UPS power management under Linux for APCC Products. It allows your
@@ -95,7 +96,7 @@
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
-
+        
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/apcupsd
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/apcupsd
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/apcupsd
@@ -113,17 +114,11 @@
 
 %post
 /sbin/chkconfig --add apcupsd
-if [ -f /var/lock/subsys/apcupsd ]; then
-	/etc/rc.d/init.d/apcupsd restart >&2
-else
-	echo "Run \"/etc/rc.d/init.d/apcupsd start\" to start apcupsd daemon."
-fi
+%service apcupsd restart "apcupsd daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/apcupsd ]; then
-		/etc/rc.d/init.d/apcupsd stop >&2
-	fi
+	%service apcupsd stop
 	/sbin/chkconfig --del apcupsd
 fi
 
@@ -166,6 +161,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.74  2006/03/17 20:07:36  dzeus
+- use %service
+
 Revision 1.73  2006/03/07 16:21:24  wolvverine
 - correct files
 - release 1
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/apcupsd.spec?r1=1.73&r2=1.74&f=u



More information about the pld-cvs-commit mailing list