[ctdb/f18] Scriptlets replaced with new systemd macros (#850072)
sbose
sbose at fedoraproject.org
Wed Sep 5 10:02:20 UTC 2012
commit 31749f2187855f28d3b5a9697b5bdf897f713ec2
Author: Sumit Bose <sbose at redhat.com>
Date: Wed Sep 5 11:15:21 2012 +0200
Scriptlets replaced with new systemd macros (#850072)
ctdb.spec | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/ctdb.spec b/ctdb.spec
index 527b7c8..4d6d816 100644
--- a/ctdb.spec
+++ b/ctdb.spec
@@ -4,7 +4,7 @@
Summary: A Clustered Database based on Samba's Trivial Database (TDB)
Name: ctdb
Version: 1.2.39
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv3+
Group: System Environment/Daemons
URL: http://ctdb.samba.org/
@@ -137,24 +137,13 @@ rm -rf %{buildroot}
%if %{with_systemd}
%post
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post ctdb.service
%preun
-if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable ctdb.service > /dev/null 2>&1 || :
- /bin/systemctl stop ctdb.service > /dev/null 2>&1 || :
-fi
+%systemd_preun ctdb.service
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart ctdb.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart ctdb.service
%else
%post
/sbin/chkconfig --add ctdb
@@ -218,6 +207,9 @@ fi
%{_libdir}/pkgconfig/ctdb.pc
%changelog
+* Wed Sep 05 2012 Václav Pavlín <vpavlin at redhat.com> - 1.2.39-5
+- Scriptlets replaced with new systemd macros (#850072)
+
* Wed Aug 22 2012 Sumit Bose <sbose at redhat.com> - 1.2.39-4
- Add cleanups for systemd (#850861)
More information about the scm-commits
mailing list