|
|
|
@ -47,7 +47,7 @@ for nameserver in $nameservers; do
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
if [ -f /etc/sysconfig/network/config ]; then
|
|
|
|
|
sed -i '/^NETCONFIG_DNS_STATIC_SERVERS=/ s/=.*$/="'$nameservers'"/' /etc/sysconfig/network/config
|
|
|
|
|
sed -i "/^NETCONFIG_DNS_STATIC_SERVERS=/ s/=.*$/=\"$nameservers\"/" /etc/sysconfig/network/config
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
[ -z "$searchdomains" ] && exit 0
|
|
|
|
@ -55,5 +55,5 @@ fi
|
|
|
|
|
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
|
|
|
|
|
sed -i "/^NETCONFIG_DNS_STATIC_SEARCHLIST=/ s/=.*$/=\"$searchdomains\"/" /etc/sysconfig/network/config
|
|
|
|
|
fi
|
|
|
|
|