2010-07-30 13:00:38 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2013-01-10 16:14:43 +00:00
|
|
|
INTERFACE=$1 # The interface which is brought up or down
|
|
|
|
STATUS=$2 # The new state of the interface
|
2010-07-30 13:00:38 +00:00
|
|
|
|
2013-01-10 16:14:43 +00:00
|
|
|
# whenever interface is brought up by NM (rhbz #565921)
|
|
|
|
if [ "$STATUS" = "up" ]; then
|
2013-09-17 12:24:40 +00:00
|
|
|
# wait a few seconds to allow interface startup to complete
|
|
|
|
# (important at boot time without this the service still fails
|
2013-09-27 08:39:07 +00:00
|
|
|
# time-out for dispatcher script is 3s (rhbz#1003695#8)
|
|
|
|
sleep 2
|
2013-01-10 16:14:43 +00:00
|
|
|
# restart the services
|
|
|
|
systemctl -q is-enabled dhcpd.service && systemctl restart dhcpd.service
|
|
|
|
systemctl -q is-enabled dhcpd6.service && systemctl restart dhcpd6.service
|
2010-07-30 13:00:38 +00:00
|
|
|
fi
|
2013-07-29 10:52:50 +00:00
|
|
|
|
|
|
|
exit 0
|