From 10e5685bf530ed0fbb5c8c2f8662305bd86ba43c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 26 Aug 2024 01:10:56 +0200 Subject: [PATCH] spcd_dns --- spcd/bootstrap.sh | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 592dd3a..07f4b4f 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -922,6 +922,23 @@ spcd_install_package() { fi } +# ╭───────┬─────╮ +# │ steps │ dns │ +# ╰───────┴─────╯ + +spcd_dns() { + spcd_step "DNS" + 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} +" + done + spcd_os_write "${SPCD_DNS_FILE}" "${spcd_sdr__text}" +} + # ╭───────┬─────╮ # │ steps │ pkg │ # ╰───────┴─────╯ @@ -1017,19 +1034,6 @@ spcd_set_https_verification_off() { fi } -spcd_set_dns_resolving() { - spcd_step "Set DNS resolving" - 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} -" - done - spcd_os_write "${SPCD_DNS_FILE}" "${spcd_sdr__text}" -} - spcd_update_packages_catalog() { spcd_step "Update packages catalog" ${SPCD_PM_UPDATE} @@ -1252,12 +1256,13 @@ spcd_main() { spcd_environment_set_variables spcd_environment_list_workspace spcd_step_out + # dns + spcd_dns # pkg spcd_set_packages_repositories spcd_set_packages_configuration # spcd_set_https_verification_off - spcd_set_dns_resolving spcd_update_packages_catalog spcd_install_packages_tools # ca