SPECS: openntpd.spec - use %service

glen glen at pld-linux.org
Mon Aug 27 21:54:08 CEST 2007


Author: glen                         Date: Mon Aug 27 19:54:08 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service

---- Files affected:
SPECS:
   openntpd.spec (1.14 -> 1.15) 

---- Diffs:

================================================================
Index: SPECS/openntpd.spec
diff -u SPECS/openntpd.spec:1.14 SPECS/openntpd.spec:1.15
--- SPECS/openntpd.spec:1.14	Sat Jun 30 22:11:54 2007
+++ SPECS/openntpd.spec	Mon Aug 27 21:54:03 2007
@@ -15,7 +15,9 @@
 BuildRequires:	automake
 BuildRequires:	gettext-devel
 BuildRequires:	openssl-devel
+BuildRequires:	rpmbuild(macros) >= 1.268
 Requires(post,preun):	/sbin/chkconfig
+Requires:	rc-scripts
 Obsoletes:	ntp
 Obsoletes:	ntp-client
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -61,17 +63,11 @@
 
 %post
 /sbin/chkconfig --add ntpd
-if [ -f /var/lock/subsys/ntpd ]; then
-	/etc/rc.d/init.d/ntpd restart >&2
-else
-	echo "Run \"/etc/rc.d/init.d/ntpd start\" to start %{name} daemon."
-fi
+%service ntpd restart "%{name} daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/ntpd ]; then
-		/etc/rc.d/init.d/ntpd stop >&2
-	fi
+	%service ntpd stop
 	/sbin/chkconfig --del ntpd
 fi
 
@@ -93,6 +89,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.15  2007/08/27 19:54:03  glen
+- use %service
+
 Revision 1.14  2007/06/30 20:11:54  areq
 - Release 1
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/openntpd.spec?r1=1.14&r2=1.15&f=u



More information about the pld-cvs-commit mailing list