mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge pull request #2142 from bcambl/fix_fedora_ip_check
Fix static IP checking on Fedora
This commit is contained in:
commit
d8c60aaae7
1 changed files with 1 additions and 1 deletions
|
@ -699,7 +699,7 @@ setStaticIPv4() {
|
||||||
IFCFG_FILE=/etc/sysconfig/network-scripts/ifcfg-${PIHOLE_INTERFACE}
|
IFCFG_FILE=/etc/sysconfig/network-scripts/ifcfg-${PIHOLE_INTERFACE}
|
||||||
IPADDR=$(echo "${IPV4_ADDRESS}" | cut -f1 -d/)
|
IPADDR=$(echo "${IPV4_ADDRESS}" | cut -f1 -d/)
|
||||||
# check if the desired IP is already set
|
# 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"
|
echo -e " ${INFO} Static IP already configured"
|
||||||
# Otherwise,
|
# Otherwise,
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue