|
|
9ba8b65 |
#!/bin/bash
|
|
|
9ba8b65 |
|
|
|
e812a0f |
INTERFACE=$1 # The interface which is brought up or down
|
|
|
e812a0f |
STATUS=$2 # The new state of the interface
|
|
|
9ba8b65 |
|
|
|
e812a0f |
# whenever interface is brought up by NM (rhbz #565921)
|
|
|
e812a0f |
if [ "$STATUS" = "up" ]; then
|
|
|
001230e |
# wait a few seconds to allow interface startup to complete
|
|
|
001230e |
# (important at boot time without this the service still fails
|
|
|
12990ac |
# time-out for dispatcher script is 3s (rhbz#1003695#8)
|
|
|
12990ac |
sleep 2
|
|
|
e812a0f |
# restart the services
|
|
|
e812a0f |
systemctl -q is-enabled dhcpd.service && systemctl restart dhcpd.service
|
|
|
e812a0f |
systemctl -q is-enabled dhcpd6.service && systemctl restart dhcpd6.service
|
|
|
9ba8b65 |
fi
|
|
|
30b7632 |
|
|
|
30b7632 |
exit 0
|