[net-snmp/f18] Updated RPM scriplets with latest systemd-rpm macros Resolves: #850403

Jan Šafránek jsafrane at fedoraproject.org
Mon Aug 27 10:48:14 UTC 2012


commit 245ffbe2018bdd9399de05054fe02021d9997260
Author: Jan Safranek <jsafrane at redhat.com>
Date:   Mon Aug 27 12:31:06 2012 +0200

    Updated RPM scriplets with latest systemd-rpm macros
    Resolves: #850403

 net-snmp.spec |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/net-snmp.spec b/net-snmp.spec
index a202f63..230e2a5 100644
--- a/net-snmp.spec
+++ b/net-snmp.spec
@@ -11,7 +11,7 @@
 Summary: A collection of SNMP protocol tools and libraries
 Name: net-snmp
 Version: 5.7.1
-Release: 9%{?dist}
+Release: 10%{?dist}
 Epoch: 1
 
 License: BSD
@@ -368,25 +368,14 @@ LD_LIBRARY_PATH=${RPM_BUILD_ROOT}/%{_libdir} make test
 
 
 %post
-if [ $1 -eq 1 ] ; then 
-    # Initial installation 
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post snmpd.service snmptrapd.service
 
 %preun
-if [ $1 = 0 ]; then
-    /bin/systemctl --no-reload disable snmpd.service > /dev/null 2>&1 || :
-    /bin/systemctl --no-reload disable snmptrapd.service > /dev/null 2>&1 || :
-    /bin/systemctl stop snmpd.service > /dev/null 2>&1 || :
-    /bin/systemctl stop snmptrapd.service > /dev/null 2>&1 || :
-fi
+%systemd_preun snmpd.service snmptrapd.service
 
 
 %postun
-if [ "$1" -ge "1" ]; then
-    /bin/systemctl try-restart snmpd.service >/dev/null 2>&1 || :
-    /bin/systemctl try-restart snmptrapd.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart snmpd.service snmptrapd.service
 
 
 %triggerun -- net-snmp < 1:5.7-5
@@ -512,6 +501,9 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_initrddir}/snmptrapd
 
 %changelog
+* Mon Aug 27 2012 Jan Safranek <jsafrane at redhat.com> - 1:5.7.1-10
+- Updated RPM scriplets with latest systemd-rpm macros (#850403)
+
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:5.7.1-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list