[spindown] Use new systemd-rpm macros in spindown spec file (resolves bz850324)

Martin Cermak mcermak at fedoraproject.org
Thu Jan 2 14:21:38 UTC 2014


commit d10a5432fb040be489bc13a3cd612ac240d9e6ee
Author: Martin Cermak <mcermak at redhat.com>
Date:   Thu Jan 2 15:21:35 2014 +0100

    Use new systemd-rpm macros in spindown spec file (resolves bz850324)

 spindown.spec |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/spindown.spec b/spindown.spec
index e818d0a..aba5401 100644
--- a/spindown.spec
+++ b/spindown.spec
@@ -1,7 +1,7 @@
 Summary:    Daemon that can spin idle disks down
 Name:       spindown
 Version:    0.4.0
-Release:    13%{?dist}
+Release:    14%{?dist}
 License:    GPLv3+
 Group:      System Environment/Daemons
 Url:        http://code.google.com/p/spindown
@@ -49,10 +49,7 @@ install -p -m 755 01spindown $RPM_BUILD_ROOT/%{_libdir}/pm-utils/sleep.d/01spind
 install -p -m 755 spindown.service $RPM_BUILD_ROOT/%{_unitdir}/spindown.service
 
 %preun
-if [ "$1" = 0 ]; then
-        /bin/systemctl stop spindown.service
-        /bin/systemctl disable spindown.service 
-fi
+%systemd_preun spindown.service
 
 %files
 %defattr(-,root,root,-)
@@ -63,6 +60,9 @@ fi
 %config(noreplace) %{_sysconfdir}/spindown.conf
 
 %changelog
+* Thu Jan 02 2014 Martin Cermak <mcermak at redhat.com> 0.4.0-14
+- Use new systemd-rpm macros in spindown spec file (resolves bz850324)
+
 * Tue Dec 03 2013 Martin Cermak <mcermak at redhat.com> 0.4.0-13
 - Build correctly with -Werror=format-security (resolves bz1037334)
 


More information about the scm-commits mailing list