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