Improve the net_resolv_pre_kube function in network.sh

Change overwrite to append /etc/resolv.conf, as in my test envrionment it
need specific nameserver for specific domain, if overwrite all the content
in resolv.conf will not install correctly.

Change-Id: I8355c2e00ccd686b48a42f13d7e3de05defa88a8
This commit is contained in:
Dong Ma 2018-03-08 12:18:46 +08:00
parent ffbf378501
commit 2bef99ec54

View File

@ -26,8 +26,7 @@ function net_default_host_ip {
function net_resolv_pre_kube {
sudo cp -f /etc/resolv.conf /etc/resolv-pre-kube.conf
sudo rm -f /etc/resolv.conf
cat << EOF | sudo tee /etc/resolv.conf
cat << EOF | sudo tee -a /etc/resolv.conf
nameserver ${UPSTREAM_DNS}
EOF
}