From 0486870ef7f8f1b7d35de0163828ae78574f4dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 22 Aug 2012 17:56:38 +0200 Subject: [PATCH] Modernize systemd scriptlets --- radvd.spec | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/radvd.spec b/radvd.spec index 65e77bf..d3d248f 100644 --- a/radvd.spec +++ b/radvd.spec @@ -1,7 +1,7 @@ Summary: A Router Advertisement daemon Name: radvd Version: 1.9.1 -Release: 3%{?dist} +Release: 4%{?dist} # The code includes the advertising clause, so it's GPL-incompatible License: BSD with advertising Group: System Environment/Daemons @@ -64,22 +64,13 @@ install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/radvd.conf install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_unitdir} %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : - -if [ "$1" -ge 1 ]; then - /bin/systemctl try-restart radvd.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart radvd.service %post -if [ "$1" -eq 1 ]; then - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post radvd.service %preun -if [ "$1" -eq 0 ]; then - /bin/systemctl --no-reload disable radvd.service > /dev/null 2>&1 || : - /bin/systemctl stop radvd.service > /dev/null 2>&1 || : -fi +%systemd_preun radvd.service %pre getent group radvd >/dev/null || groupadd -r radvd @@ -100,6 +91,9 @@ exit 0 %{_sbindir}/radvdump %changelog +* Wed Aug 22 2012 Petr Pisar - 1.9.1-4 +- Modernize systemd scriptlets (bug #850292) + * Tue Aug 07 2012 Petr Pisar - 1.9.1-3 - Remove useless chkconfig invocation (bug #845562) - Do not reload unit file while unistalling