B #147: Drop DNS conf. from Debian's interfaces

Dropped to align behaviour with other systems, where DNS configuration
is done through loc-11-dns. We should review this functionality later
once again to check if we can leave the DNS configureation on purely on
networking scripts everywhere....

Closes #147
pull/188/head
Vlastimil Holer 5 years ago
parent 41b6725d4c
commit 7829331edc
No known key found for this signature in database
GPG Key ID: EB549BADEFD07C53

@ -100,32 +100,6 @@ get_iface_var() {
echo $var
}
export DNS_VARIABLES="DNS $(env | sed 's/=.*$//' | grep -E '^ETH[0-9]+_DNS$' | sort)"
export SEARCH_VARIABLES="SEARCH_DOMAIN $(env | sed 's/=.*$//' | grep -E '^ETH[0-9]+_SEARCH_DOMAIN$' | sort)"
nameservers=$(
dns=()
for var in ${DNS_VARIABLES}; do
value=$(eval "echo \"\${$var}\"")
if [ -n "$value" ]; then
dns+=("$value")
fi
done
echo $(printf " %s" "${dns[@]}")
)
searchdomains=$(
search=()
for var in ${SEARCH_VARIABLES}; do
value=$(eval "echo \"\${$var}\"")
if [ -n "$value" ]; then
search+=("$value")
fi
done
echo $(printf " %s" "${search[@]}")
)
gen_iface_conf() {
cat <<EOT
iface $DEV inet static
@ -141,16 +115,6 @@ EOT
if [ -n "$GATEWAY" ]; then
echo " gateway $GATEWAY"
fi
#only for first interface
if [ "eth0" == $DEV ]; then
if [ -n "$nameservers" ]; then
echo " dns-nameservers $nameservers"
fi
if [ -n "$searchdomains" ]; then
echo " dns-search $searchdomains"
fi
fi
echo ""
}

Loading…
Cancel
Save