[argus] add missing scriptlets

Tom Callaway spot at fedoraproject.org
Fri Sep 9 16:25:32 UTC 2011


commit 412d12a46a74d9e12ab1ae0ba7c935cd913be024
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Fri Sep 9 12:25:19 2011 -0400

    add missing scriptlets

 argus.spec |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/argus.spec b/argus.spec
index 7c6a2cd..8bc881d 100644
--- a/argus.spec
+++ b/argus.spec
@@ -1,6 +1,6 @@
 Name: argus
 Version: 2.0.6.fixes.1
-Release: 21%{?dist}
+Release: 22%{?dist}
 Summary: Network transaction audit tool
 License: GPLv2+
 Group: Applications/Internet
@@ -18,6 +18,9 @@ Patch3: argus-clients-2.0.6.fixes.1-makefile.patch
 Patch4: argus-clients-2.0.6.fixes.1-build.patch
 Patch5: argus-clients-2.0.6.fixes.1-print.patch
 Requires(post): systemd-sysv
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
 BuildRequires: cyrus-sasl-devel tcp_wrappers flex bison ncurses-devel
 BuildRequires: libpcap-devel
 BuildRequires: systemd-units
@@ -75,6 +78,26 @@ popd
 # avoid unwanted dependencies when using these as docs (main package):
 find support -type f -exec chmod a-x '{}' \;
 
+%post
+if [ $1 -eq 1 ] ; then 
+    # Initial installation 
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+
+%preun
+if [ $1 -eq 0 ] ; then
+    # Package removal, not upgrade
+    /bin/systemctl --no-reload disable argus.service > /dev/null 2>&1 || :
+    /bin/systemctl stop argus.service > /dev/null 2>&1 || :
+fi
+
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    /bin/systemctl try-restart argus.service >/dev/null 2>&1 || :
+fi
+
 %triggerun -- argus < 2.0.6.fixes.1-21
 # Save the current service runlevel info
 # User must manually run systemd-sysv-convert --apply argus
@@ -112,6 +135,9 @@ find support -type f -exec chmod a-x '{}' \;
 %{_mandir}/man5/ra*
 
 %changelog
+* Fri Sep  9 2011 Tom Callaway <spot at fedoraproject.org> - 2.0.6.fixes.1-22
+- add missing systemd scriptlets
+
 * Thu Sep  8 2011 Tom Callaway <spot at fedoraproject.org> - 2.0.6.fixes.1-21
 - convert to systemd
 


More information about the scm-commits mailing list