12-dhcpd NM dispatcher script now restarts also dhcpd6 service
This commit is contained in:
parent
854a7431bc
commit
e812a0fa7b
14
12-dhcpd
14
12-dhcpd
@ -1,11 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export LC_ALL=C
|
|
||||||
|
|
||||||
# restart dhcpd whenever $1 interface is brought up by NM (rhbz #565921)
|
INTERFACE=$1 # The interface which is brought up or down
|
||||||
if [ "$2" = "up" ]; then
|
STATUS=$2 # The new state of the interface
|
||||||
# exit if the service is not configured to be started in the current runlevel
|
|
||||||
/bin/systemctl is-enabled dhcpd.service || exit 0
|
|
||||||
|
|
||||||
# restart service
|
# whenever interface is brought up by NM (rhbz #565921)
|
||||||
/bin/systemctl restart dhcpd.service || :
|
if [ "$STATUS" = "up" ]; then
|
||||||
|
# restart the services
|
||||||
|
systemctl -q is-enabled dhcpd.service && systemctl restart dhcpd.service
|
||||||
|
systemctl -q is-enabled dhcpd6.service && systemctl restart dhcpd6.service
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user