add: dns configuration

pull/75/head
kvaps 8 years ago
parent d92c89e02f
commit 3c9f1a23ae

@ -46,7 +46,14 @@ for nameserver in $nameservers; do
echo nameserver $nameserver >> /etc/resolv.conf echo nameserver $nameserver >> /etc/resolv.conf
done done
if [ -f /etc/sysconfig/network/config ]; then
sed -i '/^NETCONFIG_DNS_STATIC_SERVERS=/ s/=.*$/="'$nameservers'"/' /etc/sysconfig/network/config
fi
[ -z "$searchdomains" ] && exit 0 [ -z "$searchdomains" ] && exit 0
echo search $searchdomains >> /etc/resolv.conf echo search $searchdomains >> /etc/resolv.conf
if [ -f /etc/sysconfig/network/config ]; then
sed -i '/^NETCONFIG_DNS_STATIC_SEARCHLIST=/ s/=.*$/="'$searchdomains'"/' /etc/sysconfig/network/config
fi

Loading…
Cancel
Save