mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
basic_install: If a static interface is already set up we are done
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
b5c7657e01
commit
dc91d4b1f9
1 changed files with 7 additions and 0 deletions
|
@ -873,6 +873,13 @@ setStaticIPv4() {
|
|||
# Local, named variables
|
||||
local IFCFG_FILE
|
||||
local CONNECTION_NAME
|
||||
|
||||
# If a static interface is already configured, we are done.
|
||||
if [[ -r "/etc/sysconfig/network/ifcfg-${PIHOLE_INTERFACE}" ]]; then
|
||||
if grep -q '^BOOTPROTO=.static.' "/etc/sysconfig/network/ifcfg-${PIHOLE_INTERFACE}"; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
# For the Debian family, if dhcpcd.conf exists,
|
||||
if [[ -f "/etc/dhcpcd.conf" ]]; then
|
||||
# configure networking via dhcpcd
|
||||
|
|
Loading…
Reference in a new issue