Updated RPM scriplets with latest systemd-rpm macros

Resolves: #850403
This commit is contained in:
Jan Safranek 2012-08-27 12:31:06 +02:00
parent 06ab0a5471
commit 245ffbe201

View File

@ -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@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@lists.fedoraproject.org> - 1:5.7.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild