[clamav] use %systemd macros

ensc ensc at fedoraproject.org
Sat Sep 22 10:46:09 UTC 2012


commit 83f132f1a4adbcf69812decd528783801e88a75f
Author: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
Date:   Sat Sep 22 12:44:58 2012 +0200

    use %systemd macros

 clamav.spec |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/clamav.spec b/clamav.spec
index 5fabdeb..482533e 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -42,13 +42,11 @@ Requires(postun):	 /bin/systemctl\
 %nil}
 %{!?systemd_install:%global systemd_install()\
 %post %1\
-test "$1" != "1" || /bin/systemctl daemon-reload >/dev/null 2>&1 || :\
+%systemd_post %2 \
 %preun %1\
-test "$1" != "0" || /bin/systemctl --no-reload disable %2 >/dev/null 2>&1 || :\
-test "$1" != "0" || /bin/systemctl stop %2 >/dev/null 2>&1 || :\
+%systemd_preun %2 \
 %postun %1\
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :\
-test "$1" = "0" || /bin/systemctl try-restart %2 >/dev/null 2>&1 || :\
+%systemd_postun_with_restart %2 \
 %nil}
 
 
@@ -861,6 +859,7 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
 %changelog
 * Sat Sep 22 2012 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.97.6-1900
 - updated to 0.97.6
+- use %%systemd macros
 
 * Tue Aug 14 2012 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.97.5-1900
 - disabled upstart support


More information about the scm-commits mailing list