diff options
-rwxr-xr-x | sbin/dhclient-script | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/dhclient-script b/sbin/dhclient-script index f1c77f2..2b2fe1d 100755 --- a/sbin/dhclient-script +++ b/sbin/dhclient-script @@ -235,11 +235,14 @@ add_new_resolv_conf() { fi if [ -n "$new_domain_name_servers" ]; then /bin/rm -f /var/etc/nameserver_$interface + ALLOWOVERRIDE=`/usr/bin/grep dnsallowoverride /conf/config.xml | /usr/bin/wc -l` for nameserver in $new_domain_name_servers; do # Add a route to the nameserver out the correct interface # so that mulitple wans work correctly with multiple dns # also backup the nameserver for later route removal - echo $nameserver >>/var/etc/nameserver_$interface + if [ $ALLOWOVERRIDE -gt 0 ]; then + echo $nameserver >>/var/etc/nameserver_$interface + fi $ROUTE add $nameserver -iface $interface done echo $new_domain_name >/var/etc/searchdomain_$interface |