]> git.pld-linux.org Git - packages/acpid.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:
    acpid.spec -> 1.43

acpid.spec

index 11c84ef8289616efe00116106bd42cfdcc4008ed..9d1e5df9598b04041ffbf46e7a4dc786a39583ef 100644 (file)
@@ -18,8 +18,9 @@ Source4:      %{name}.halt_on_power_button.conf
 Patch0:                %{name}-powersh_fix.patch
 Patch1:                %{name}-gcc4.patch
 URL:           http://acpid.sourceforge.net/
-PreReq:                rc-scripts
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
 Obsoletes:     apmd
 Obsoletes:     poweracpid
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -53,7 +54,6 @@ install samples/acpi_handler.sh $RPM_BUILD_ROOT%{_sbindir}/power.sh
 # Or create halt_on_power_button subpackage
 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events
 
-
 > $RPM_BUILD_ROOT/var/log/acpid
 
 %clean
@@ -61,29 +61,19 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add acpid
-if [ -f /var/lock/subsys/acpid ]; then
-       /etc/rc.d/init.d/acpid restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/acpid start\" to start ACPI daemon."
-fi
+%service acpid restart "ACPI daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/acpid ]; then
-               /etc/rc.d/init.d/acpid stop>&2
-       fi
+       %service acpid stop
        /sbin/chkconfig --del acpid
 fi
 
-# %post halt_on_power_button
-# if [ -f /var/lock/subsys/acpid ]; then
-#     /etc/rc.d/init.d/acpid reload
-# fi
+# %%post halt_on_power_button
+# %%service -q acpid reload
 
-# %postun halt_on_power_button
-# if [ -f /var/lock/subsys/acpid ]; then
-#     /etc/rc.d/init.d/acpid reload
-# fi
+# %%postun halt_on_power_button
+# %%service -q acpid reload
 
 %files
 %defattr(644,root,root,755)
This page took 0.126806 seconds and 4 git commands to generate.