]> git.pld-linux.org Git - packages/apmd.git/commitdiff
- use %service
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 24 Feb 2006 15:20:04 +0000 (15:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apmd.spec -> 1.59

apmd.spec

index 9eff2f9a02bc68ad5b08cbb12a22da538cceb771..52eda438b9612f276300cea28ab8564464f4293c 100644 (file)
--- a/apmd.spec
+++ b/apmd.spec
@@ -30,6 +30,7 @@ Source1:      %{name}.init
 URL:           http://www.worldvisions.ca/~apenwarr/apmd/
 BuildRequires: XFree86-devel
 BuildRequires: libtool
+BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: sed >= 4.0
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
@@ -276,17 +277,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add apmd
-if [ -f /var/lock/subsys/apmd ]; then
-       /etc/rc.d/init.d/apmd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/apmd start\" to start apmd daemon."
-fi
+%service apmd restart "apmd daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/apmd ]; then
-               /etc/rc.d/init.d/apmd stop 1>&2
-       fi
+       %service apmd stop
        /sbin/chkconfig --del apmd
 fi
 
This page took 0.039191 seconds and 4 git commands to generate.