rewrite loopback namservers to 8.8.8.8

This commit is contained in:
Eric Litak 2020-12-10 14:29:38 -08:00
parent 8df82582c0
commit a688bfaa0a

View file

@ -79,7 +79,10 @@ EOF
extraRules1="" extraRules1=""
fi fi
readarray nameservers < <(grep ^nameserver /etc/resolv.conf | sed -r 's/^nameserver[[:space:]]+([0-9.a-fA-F]+).*/"\1"/') readarray nameservers < <(grep ^nameserver /etc/resolv.conf | sed -r \
-e 's/^nameserver[[:space:]]+([0-9.a-fA-F:]+).*/"\1"/' \
-e 's/127[0-9.]+/8.8.8.8/' \
-e 's/::1/8.8.8.8/' )
if [[ "$eth0_name" = eth* ]]; then if [[ "$eth0_name" = eth* ]]; then
predictable_inames="usePredictableInterfaceNames = lib.mkForce false;" predictable_inames="usePredictableInterfaceNames = lib.mkForce false;"