dispatcher.d/12-dhcpd: use reset-failed command

Suggested by Lukas Nykryn.
This commit is contained in:
Jiri Popelka 2015-11-24 13:48:51 +01:00
parent d6db3a5145
commit 4b570e22a7
2 changed files with 8 additions and 3 deletions

View File

@ -10,8 +10,10 @@ if [ "$STATUS" = "up" ]; then
# time-out for dispatcher script is 3s (rhbz#1003695#8)
sleep 2
# restart the services
systemctl -q is-enabled dhcpd.service && systemctl restart dhcpd.service
systemctl -q is-enabled dhcpd6.service && systemctl restart dhcpd6.service
# In case this dispatcher script is called several times in a short period of time, it might happen that
# systemd refuses to further restart the units. Therefore we use reset-failed command to prevent it.
systemctl -q is-enabled dhcpd.service && systemctl restart dhcpd.service && systemctl reset-failed dhcpd.service
systemctl -q is-enabled dhcpd6.service && systemctl restart dhcpd6.service && systemctl reset-failed dhcpd6.service
fi
exit 0

View File

@ -18,7 +18,7 @@
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.3.3
Release: 7%{?dist}
Release: 8%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# 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.
@ -663,6 +663,9 @@ done
%doc doc/html/
%changelog
* Tue Nov 24 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.3-8
- dispatcher.d/12-dhcpd: use reset-failed command
* Mon Nov 23 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.3-7
- dhclient-script: hostname -> hostnamectl --transient