[iputils] Add systemd-rpm macros

jsynacek jsynacek at fedoraproject.org
Wed Aug 22 05:35:22 UTC 2012


commit a71bcdb6b3a5b2828a0a2fb8bf34524793cd1afb
Author: Jan Synacek <jsynacek at redhat.com>
Date:   Wed Aug 22 07:33:39 2012 +0200

    Add systemd-rpm macros

 iputils.spec |   21 ++++-----------------
 1 files changed, 4 insertions(+), 17 deletions(-)
---
diff --git a/iputils.spec b/iputils.spec
index eaa4ddc..f835188 100644
--- a/iputils.spec
+++ b/iputils.spec
@@ -146,27 +146,13 @@ touch -r RELNOTES RELNOTES.tmp
 mv -f RELNOTES.tmp RELNOTES
 
 %post
-%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
+%systemd_post rdisc.service
 
 %preun
-if [ $1 = 0 ]; then
-	/bin/systemctl disable rdisc.service > /dev/null 2>&1 || :
-	/bin/systemctl stop rdisc.service > /dev/null 2>&1 || :
-fi 
+%systemd_preun rdisc.service
 
 %postun
-%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
-
-if [ "$1" -ge "1" ]; then
-	/bin/systemctl try-restart rdisc.service >/dev/null 2>&1 || :
-fi
-
-%triggerun --  %{name} < 20101006-9
-	/sbin/chkconfig --del rdisc >/dev/null 2>&1 || :
-	/bin/systemctl try-restart rdisc.service >/dev/null 2>&1 || :
-
-%triggerpostun -n %{name}-sysvinit -- %{name} < 20101006-9
-	/sbin/chkconfig --add rdisc >/dev/null 2>&1 || :
+%systemd_postun_with_restart rdisc.service
 
 %files
 %doc RELNOTES README.bonding
@@ -191,6 +177,7 @@ fi
 %changelog
 * Wed Aug 22 2012 Jan Synáček <jsynacek at redhat.com> - 20101006-18
 - Improve spec for fedora
+- Add systemd-rpm macros
 
 * Mon Jul 23 2012 Jan Synáček <jsynacek at redhat.com> 20101006-17
 - Minor update: capabilities patch


More information about the scm-commits mailing list