dns
This commit is contained in:
parent
0cb9952b32
commit
c356baee6d
1 changed files with 7 additions and 3 deletions
10
cd.sh
10
cd.sh
|
@ -1,8 +1,10 @@
|
|||
#! /usr/bin/env sh
|
||||
|
||||
[ "${CD_DNS}" ] || CD_DNS="\
|
||||
# defaults
|
||||
CD_DEFAULT_DNS="\
|
||||
9.9.9.9 \
|
||||
"
|
||||
|
||||
CD_PYTHON_MODULES="\
|
||||
cd \
|
||||
rwx \
|
||||
|
@ -11,7 +13,7 @@ rwx \
|
|||
# main
|
||||
cd_main () {
|
||||
cd_set_environment
|
||||
cd_set_dns_resolving ${CD_DNS}
|
||||
cd_set_dns_resolving
|
||||
cd_set_packages_repositories
|
||||
cd_set_packages_configuration
|
||||
cd_write_ca_certificates
|
||||
|
@ -102,9 +104,11 @@ local variable
|
|||
|
||||
cd_set_dns_resolving () {
|
||||
local server
|
||||
local servers
|
||||
local text=""
|
||||
cd_step "Set DNS resolving"
|
||||
for server in "${@}" ; do
|
||||
"${CD_DNS}" && servers="${CD_DNS}" || servers="${CD_DEFAULT_DNS}"
|
||||
for server in ${servers} ; do
|
||||
text="${text}nameserver ${server}
|
||||
"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue