1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

Merge pull request #2142 from bcambl/fix_fedora_ip_check

Fix static IP checking on Fedora
This commit is contained in:
Adam Warner 2018-04-29 14:36:07 +01:00 committed by GitHub
commit d8c60aaae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -699,7 +699,7 @@ setStaticIPv4() {
IFCFG_FILE=/etc/sysconfig/network-scripts/ifcfg-${PIHOLE_INTERFACE}
IPADDR=$(echo "${IPV4_ADDRESS}" | cut -f1 -d/)
# check if the desired IP is already set
if grep -q "${IPADDR}" "${IFCFG_FILE}"; then
if grep -Eq "${IPADDR}(\\b|\\/)" "${IFCFG_FILE}"; then
echo -e " ${INFO} Static IP already configured"
# Otherwise,
else