From dc91d4b1f90192fb71aa73e8af85c338bda2882e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 5 Feb 2019 09:06:57 +0000 Subject: [PATCH] basic_install: If a static interface is already set up we are done Signed-off-by: Andreas Schneider --- automated install/basic-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 8666e70a..acf5b92d 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -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