[dlm] Scriptlets replaced with new systemd macros

David Teigland teigland at fedoraproject.org
Wed Sep 5 13:54:40 UTC 2012


commit 5b976e5f842efefdbe79261feedbd730294edcd1
Author: David Teigland <teigland at redhat.com>
Date:   Wed Sep 5 08:54:12 2012 -0500

    Scriptlets replaced with new systemd macros

 dlm.spec |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/dlm.spec b/dlm.spec
index 140c11f..4bf359b 100644
--- a/dlm.spec
+++ b/dlm.spec
@@ -1,6 +1,6 @@
 Name:           dlm
 Version:        3.99.5
-Release:        6%{?dist}
+Release:        7%{?dist}
 License:        GPLv2 and GPLv2+ and LGPLv2+
 # For a breakdown of the licensing, see README.license
 Group:          System Environment/Kernel
@@ -53,21 +53,13 @@ install -Dm 0644 init/dlm.service %{buildroot}%{_unitdir}/dlm.service
 install -Dm 0644 init/dlm.sysconfig %{buildroot}/etc/sysconfig/dlm
 
 %post
-if [ $1 -eq 1 ] ; then 
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post dlm.service
 
 %preun
-if [ $1 -eq 0 ] ; then
-    /bin/systemctl --no-reload disable dlm.service > /dev/null 2>&1 || :
-    /bin/systemctl stop dlm.service > /dev/null 2>&1 || :
-fi
+%systemd_preun dlm.service
 
 %postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    /bin/systemctl try-restart dlm.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart dlm.service
 
 %files
 %defattr(-,root,root,-)
@@ -116,6 +108,9 @@ developing applications that use %{name}.
 %{_libdir}/pkgconfig/*.pc
 
 %changelog
+* Wed Sep 05 2012 Václav Pavlín <vpavlin at redhat.com> - 3.99.5-7
+- Scriptlets replaced with new systemd macros (#850093)
+
 * Tue Aug 28 2012 David Teigland <teigland at redhat.com> - 3.99.5-6
 - only fedora requires kernel-modules-extra
 


More information about the scm-commits mailing list