SPECS: ifplugd.spec - use %service

darekr darekr at pld-linux.org
Wed Apr 26 15:49:07 CEST 2006


Author: darekr                       Date: Wed Apr 26 13:49:07 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service

---- Files affected:
SPECS:
   ifplugd.spec (1.18 -> 1.19) 

---- Diffs:

================================================================
Index: SPECS/ifplugd.spec
diff -u SPECS/ifplugd.spec:1.18 SPECS/ifplugd.spec:1.19
--- SPECS/ifplugd.spec:1.18	Wed Apr 26 15:44:13 2006
+++ SPECS/ifplugd.spec	Wed Apr 26 15:49:01 2006
@@ -15,7 +15,8 @@
 BuildRequires:	libdaemon-devel >= 0.5
 BuildRequires:	lynx
 BuildRequires:	pkgconfig
-PreReq:		rc-scripts
+BuildRequires:	rpmbuild(macros) >= 1.268
+Requires(post,preun):	rc-scripts
 Requires(post,preun):	/sbin/chkconfig
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -60,17 +61,11 @@
 
 %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} service."
-fi
+	%service ifplugd restart
 
 %preun
 if [ "$1" = "0" ]; then
-        if [ -f /var/lock/subsys/%{name} ]; then
-                /etc/rc.d/init.d/%{name} stop 1>&2
-        fi
+	%service ifplugd stop
         /sbin/chkconfig --del %{name}
 fi
 
@@ -90,6 +85,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.19  2006/04/26 13:49:01  darekr
+- use %service
+
 Revision 1.18  2006/04/26 13:44:13  piti
 - URL update
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/ifplugd.spec?r1=1.18&r2=1.19&f=u



More information about the pld-cvs-commit mailing list