fixed SPEC file so it comply with new systemd-rpm macros guidelines (#850089)

This commit is contained in:
Tomas Hozza 2012-08-22 10:10:25 +02:00
parent 60e971c9e5
commit 95a6f13614

View File

@ -18,7 +18,7 @@
Summary: Dynamic host configuration protocol software Summary: Dynamic host configuration protocol software
Name: dhcp Name: dhcp
Version: 4.2.4 Version: 4.2.4
Release: 12.%{patchver}%{?dist} Release: 13.%{patchver}%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and # dcantrell maintaining the package) made incorrect use of the epoch and
# that's why it is at 12 now. It should have never been used, but it was. # that's why it is at 12 now. It should have never been used, but it was.
@ -487,9 +487,9 @@ exit 0
%post %post
# Initial installation # Initial installation
if [ $1 -eq 1 ] ; then %systemd_post dhcpd.service
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_post dhcpd6.service
fi %systemd_post dhcrelay.service
# Update # Update
if [ $1 -gt 1 ] ; then if [ $1 -gt 1 ] ; then
@ -499,24 +499,16 @@ fi
%preun %preun
# Package removal, not upgrade # Package removal, not upgrade
if [ $1 -eq 0 ] ; then %systemd_preun dhcpd.service
/bin/systemctl --no-reload disable dhcpd.service > /dev/null 2>&1 || : %systemd_preun dhcpd6.service
/bin/systemctl --no-reload disable dhcpd6.service > /dev/null 2>&1 || : %systemd_preun dhcrelay.service
/bin/systemctl --no-reload disable dhcrelay.service > /dev/null 2>&1 || :
/bin/systemctl stop dhcpd.service > /dev/null 2>&1 || :
/bin/systemctl stop dhcpd6.service > /dev/null 2>&1 || :
/bin/systemctl stop dhcrelay.service > /dev/null 2>&1 || :
fi
%postun %postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
# Package upgrade, not uninstall # Package upgrade, not uninstall
if [ $1 -ge 1 ]; then %systemd_postun_with_restart dhcpd.service
/bin/systemctl try-restart dhcpd.service >/dev/null 2>&1 || : %systemd_postun_with_restart dhcpd6.service
/bin/systemctl try-restart dhcpd6.service >/dev/null 2>&1 || : %systemd_postun_with_restart dhcrelay.service
/bin/systemctl try-restart dhcrelay.service >/dev/null 2>&1 || :
fi
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
@ -591,6 +583,9 @@ fi
%changelog %changelog
* Wed Aug 22 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-13.P1
- fixed SPEC file so it comply with new systemd-rpm macros guidelines (#850089)
* Mon Aug 20 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-12.P1 * Mon Aug 20 2012 Tomas Hozza <thozza@redhat.com> - 12:4.2.4-12.P1
- dhclient-script: fixed CONFIG variable value passed to need_config (#848858) - dhclient-script: fixed CONFIG variable value passed to need_config (#848858)
- dhclient-script: calling dhclient-up-hooks after setting up route, gateways - dhclient-script: calling dhclient-up-hooks after setting up route, gateways