basic_install: If a static interface is already set up we are done

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
pull/2621/head
Andreas Schneider 5 years ago
parent b5c7657e01
commit dc91d4b1f9

@ -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…
Cancel
Save