This commit is contained in:
Marc Beninca 2024-05-04 12:14:30 +02:00
parent e8bdfcf982
commit 96f1d9f380
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

28
cd.sh
View file

@ -16,10 +16,10 @@ rwx \
cd_main () {
cd_list_working_directory
cd_set_environment_variables
cd_set_dns_resolving
cd_set_packages_repositories
cd_set_packages_configuration
cd_set_https_verification_off
cd_set_dns_resolving
cd_update_packages_catalog
cd_install_packages_tools
cd_install_ca_certificates
@ -164,19 +164,6 @@ Dir::Etc::SourceParts \"\";
cd_echo "CD_PROJECTS_URL" "CD_PROJECT_URL"
}
cd_set_dns_resolving () {
local server
local servers
local text=""
cd_step "Set DNS resolving"
[ "${CD_DNS}" ] && servers="${CD_DNS}" || servers="${CD_DEFAULT_DNS}"
for server in ${servers} ; do
text="${text}nameserver ${server}
"
done
cd_write "${CD_DNS_FILE}" "${text}"
}
cd_set_packages_repositories () {
local expression
local file
@ -217,6 +204,19 @@ cd_set_https_verification_off () {
fi
}
cd_set_dns_resolving () {
local server
local servers
local text=""
cd_step "Set DNS resolving"
[ "${CD_DNS}" ] && servers="${CD_DNS}" || servers="${CD_DEFAULT_DNS}"
for server in ${servers} ; do
text="${text}nameserver ${server}
"
done
cd_write "${CD_DNS_FILE}" "${text}"
}
cd_update_packages_catalog () {
cd_step "Update packages catalog"
${CD_CMD_UPDATE} || exit