[389-ds-base] Ticket 431 - Introduce new systemd-rpm macros in 389-ds-base spec file
Mark Reynolds
mreynolds at fedoraproject.org
Fri Oct 19 21:36:41 UTC 2012
commit 3dfc57b1bc96123eee9c99ed6e0ebea4fdba2d1c
Author: Mark Reynolds <mreynolds at redhat.com>
Date: Fri Oct 19 17:03:11 2012 -0400
Ticket 431 - Introduce new systemd-rpm macros in 389-ds-base spec file
Added the new systemd macros
https://fedorahosted.org/389/ticket/431
Reviewed by: richm(Thanks!)
(cherry picked from commit 81c22d34f83c294f67adbafd1af142bea0b13a69)
389-ds-base.spec | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/389-ds-base.spec b/389-ds-base.spec
index 96a1920..9dfaf0b 100644
--- a/389-ds-base.spec
+++ b/389-ds-base.spec
@@ -210,6 +210,7 @@ rm -rf $RPM_BUILD_ROOT
%post
output=/dev/null
+%systemd_post %{pkgname}-snmp.service
# reload to pick up any changes to systemd files
/bin/systemctl daemon-reload >$output 2>&1 || :
# reload to pick up any shared lib changes
@@ -257,8 +258,7 @@ exit 0
%preun
if [ $1 -eq 0 ]; then # Final removal
# Package removal, not upgrade
- /bin/systemctl --no-reload disable %{pkgname}-snmp.service %{groupname} > /dev/null 2>&1 || :
- /bin/systemctl stop %{pkgname}-snmp.service %{groupname} > /dev/null 2>&1 || :
+ %systemd_preun %{pkgname}-snmp.service %{groupname}
# remove instance specific service files/links
rm -rf %{_sysconfdir}/systemd/system/%{groupname}.wants/* > /dev/null 2>&1 || :
fi
More information about the scm-commits
mailing list