SPECS: dchub.spec - use %service

glen glen at pld-linux.org
Wed Jul 26 17:44:05 CEST 2006


Author: glen                         Date: Wed Jul 26 15:44:05 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service

---- Files affected:
SPECS:
   dchub.spec (1.26 -> 1.27) 

---- Diffs:

================================================================
Index: SPECS/dchub.spec
diff -u SPECS/dchub.spec:1.26 SPECS/dchub.spec:1.27
--- SPECS/dchub.spec:1.26	Wed Jul 26 17:43:08 2006
+++ SPECS/dchub.spec	Wed Jul 26 17:44:00 2006
@@ -21,6 +21,7 @@
 BuildRequires:	perl-devel
 BuildRequires:	pkgconfig
 BuildRequires:	python-devel
+BuildRequires:	rpmbuild(macros) >= 1.268
 Requires(post,preun):	/sbin/chkconfig
 Requires:	perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
 Requires:	perl-Locale-gettext
@@ -68,21 +69,13 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ "$1" = "1" ]; then
-	/sbin/chkconfig --add dchub
-fi
-if [ -f /var/lock/subsys/dchub ]; then
-	/etc/rc.d/init.d/dchub restart >&2
-else
-	echo "Run /etc/rc.d/init.d/dchub start to start dchub daemon"
-fi
+/sbin/chkconfig --add dchub
+%service dchub restart
 
 %preun
 if [ "$1" = "0" ]; then
 	/sbin/chkconfig --del dchub
-	if [ -f /var/lock/subsys/dchub ]; then
-		/etc/rc.d/init.d/dchub stop >&2
-	fi
+	%service dchub stop
 fi
 
 %files
@@ -122,6 +115,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.27  2006/07/26 15:44:00  glen
+- use %service
+
 Revision 1.26  2006/07/26 15:43:08  glen
 - remove extra unneeded slash
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/dchub.spec?r1=1.26&r2=1.27&f=u



More information about the pld-cvs-commit mailing list