From b1dc480079dd984fbb7d5bc5f8e9d31c4c2f51e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 14 Apr 2006 17:40:01 +0000 Subject: [PATCH] - use %service Changed files: apmud.spec -> 1.5 --- apmud.spec | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/apmud.spec b/apmud.spec index 3dd710d..c5ac62d 100644 --- a/apmud.spec +++ b/apmud.spec @@ -10,6 +10,7 @@ Source0: http://linuxppc.jvc.nl/%{name}-%{version}.tgz Source1: %{name}.init Patch0: %{name}-pwrctl.patch URL: http://linuxppc.jvc.nl/ +BuildRequires: rpmbuild(macros) >= 1.268 Requires(post,preun): /sbin/chkconfig Requires: dev Requires: hdparm @@ -60,17 +61,11 @@ rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add pmud -if [ -f /var/lock/subsys/pmud ]; then - /etc/rc.d/init.d/pmud restart >&2 -else - echo "Run \"/etc/rc.d/init.d/pmud start\" to start pmud daemon." -fi +%service pmud restart "pmud daemon" %preun if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/pmud ]; then - /etc/rc.d/init.d/pmud stop >&2 - fi + %service pmud stop /sbin/chkconfig --del pmud fi -- 2.44.0