SPECS: haproxy.spec - use %service

glen glen at pld-linux.org
Sun Jul 16 13:17:10 CEST 2006


Author: glen                         Date: Sun Jul 16 11:17:10 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service

---- Files affected:
SPECS:
   haproxy.spec (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SPECS/haproxy.spec
diff -u SPECS/haproxy.spec:1.5 SPECS/haproxy.spec:1.6
--- SPECS/haproxy.spec:1.5	Mon Sep 26 04:07:20 2005
+++ SPECS/haproxy.spec	Sun Jul 16 13:17:05 2006
@@ -12,8 +12,9 @@
 Source2:	%{name}.init
 URL:		http://w.ods.org/tools/haproxy/
 BuildRequires:	pcre-devel
-PreReq:		rc-scripts
+BuildRequires:	rpmbuild(macros) >= 1.268
 Requires(post,preun):	/sbin/chkconfig
+Requires:	rc-scripts
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -72,17 +73,13 @@
 
 %post
 /sbin/chkconfig --add %{name}
-if [ -f %{_var}/lock/subsys/%{name} ]; then
-        /etc/rc.d/init.d/%{name} restart 1>&2
-else
-        echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
-fi
+%service %{name} restart
 
 %preun
-if [ "$1" = "0" -a -f %{_var}/lock/subsys/%{name} ]; then
-        /etc/rc.d/init.d/%{name} stop 1>&2
+if [ "$1" = "0" ]; then
+	%service %{name} stop
+	/sbin/chkconfig --del %{name}
 fi
-/sbin/chkconfig --del %{name}
 
 %files
 %defattr(644,root,root,755)
@@ -98,6 +95,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.6  2006/07/16 11:17:05  glen
+- use %service
+
 Revision 1.5  2005/09/26 02:07:20  zbyniu
 - up to 1.1.32
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/haproxy.spec?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list