1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-02-21 20:42:01 +00:00

Merge pull request #1811 from bcambl/nmcli_check

check NetworkManager status prior to using the cli (#1653)
This commit is contained in:
Jacob Salmela 2017-12-08 06:38:42 -06:00 committed by GitHub
commit af59824819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -709,8 +709,8 @@ setStaticIPv4() {
}> "${IFCFG_FILE}"
# Use ip to immediately set the new address
ip addr replace dev "${PIHOLE_INTERFACE}" "${IPV4_ADDRESS}"
# If NetworkMangler command line interface exists,
if command -v nmcli &> /dev/null;then
# If NetworkMangler command line interface exists and ready to mangle,
if command -v nmcli &> /dev/null && nmcli general status &> /dev/null; then
# Tell NetworkManagler to read our new sysconfig file
nmcli con load "${IFCFG_FILE}" > /dev/null
fi