From 4b570e22a7f2bb580fc95b4fa64474de3f09b3cb Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Nov 24 2015 12:48:51 +0000 Subject: dispatcher.d/12-dhcpd: use reset-failed command Suggested by Lukas Nykryn. --- diff --git a/12-dhcpd b/12-dhcpd index 5b577bc..e75aa93 100644 --- a/12-dhcpd +++ b/12-dhcpd @@ -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 diff --git a/dhcp.spec b/dhcp.spec index 375bfcb..4a8149d 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -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 - 12:4.3.3-8 +- dispatcher.d/12-dhcpd: use reset-failed command + * Mon Nov 23 2015 Jiri Popelka - 12:4.3.3-7 - dhclient-script: hostname -> hostnamectl --transient