From a71bcdb6b3a5b2828a0a2fb8bf34524793cd1afb Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Wed, 22 Aug 2012 07:33:39 +0200 Subject: [PATCH] Add systemd-rpm macros --- iputils.spec | 21 ++++----------------- 1 file 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 - 20101006-18 - Improve spec for fedora +- Add systemd-rpm macros * Mon Jul 23 2012 Jan Synáček 20101006-17 - Minor update: capabilities patch