]> git.pld-linux.org Git - packages/irqbalance.git/commitdiff
- use %service and adapterize
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 2 Mar 2006 23:01:11 +0000 (23:01 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    irqbalance.spec -> 1.13

irqbalance.spec

index 504283407cdf2fa1333b44f48bb17c4befc070e4..06ab30b12dde614ee5b84f7dce1e2efac64be361 100644 (file)
@@ -9,8 +9,9 @@ Source0:        http://people.redhat.com/arjanv/irqbalance/%{name}-%{version}.tar.gz
 # Source0-md5: 1f225b73a01380955231b77d9be60c7a
 Source1:       %{name}.init
 Patch0:                %{name}-opt.patch
-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
@@ -41,18 +42,12 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add irqbalance
-if [ -f /var/lock/subsys/irqbalance ]; then
-        /etc/rc.d/init.d/irqbalance restart 1>&2
-else
-        echo "Run \"/etc/rc.d/init.d/irqbalance start\" to start irqbalance daemon."
-fi
+%service irqbalance restart "irqbalance daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-        if [ -f /var/lock/subsys/irqbalance ]; then
-                /etc/rc.d/init.d/irqbalance stop 1>&2
-        fi
-        /sbin/chkconfig --del irqbalance
+       %service irqbalance stop
+       /sbin/chkconfig --del irqbalance
 fi
 
 %files
This page took 0.039658 seconds and 4 git commands to generate.