From 05636f94f38f23f0159630091a87c29b72a55ccb Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 31 Aug 2024 09:32:52 +0200 Subject: [PATCH] dns --- spcd/bootstrap.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index c25df3d..189dc15 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -856,15 +856,16 @@ spcd_query_package() { spcd_step__dns() { spcd_step "DNS" + local index value text while true; do - spcd_sdr__index=$((spcd_sdr__index + 1)) - eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\"" - [ -n "${spcd_sdr__value}" ] || break - spcd_sdr__text="${spcd_sdr__text}\ -nameserver ${spcd_sdr__value} + index=$((index + 1)) + eval "value=\"\${SPCD_DNS_${index}}\"" + [ -n "${value}" ] || break + text="${text}\ +nameserver ${value} " done - spcd_os_write "/etc/resolv.conf" "${spcd_sdr__text}" + spcd_os_write "/etc/resolv.conf" "${text}" } # ╭──────┬──────────╮