From 42b539ae1b1c84b41cfe66f684e8ac791102a8b2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 7 May 2025 09:16:00 +0200 Subject: [PATCH] Update alpine-install.func --- misc/alpine-install.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 36d62e1..8dba04c 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -102,10 +102,10 @@ setting_up_container() { CONFIG_FILE="/etc/udhcpc/udhcpc.conf" # Extract any configured DNS server from /etc/network/interfaces - DNS_LINE=$(grep -E '^ *dns-nameservers' /etc/network/interfaces 2>/dev/null | awk '{print $2}') + CUSTOM_DNS=$(grep -E '^ *dns-nameservers' /etc/network/interfaces 2>/dev/null | awk '{print $2}') # Only patch if DNS is set and not 'host' - if [ -n "$DNS_LINE" ] && [ "$DNS_LINE" != "host" ]; then + if [ -n "$CUSTOM_DNS" ] && [ "$CUSTOM_DNS" != "host" ]; then # Remove all RESOLV_CONF= lines (active or commented) sed -i '/^#*RESOLV_CONF="/d' "$CONFIG_FILE"