# The purpose of this script is just to try and ensure that we don't # overwrite nameserver information from another source. Specifically, # it's a fairly common occurance for dhclient to overwrite the # nameservers which have been configured by vpnc. In many cases, this # causes DNS to break for the user. # # This is a fairly tricky edge case to handle. It's not obvious what # the proper behavior is in all cases. The root of the problem is just # that resolv.conf is a pretty simplistic configuration file, with no # standard system for handling updates from multiple sources. # # As a fairly general solution which will hopefully work in most cases, # we only attempt to update resolv.conf if the nameserver has changed # since we got the lease. If the nameserver has not changed since the # lease was BOUND, then presumably resolv.conf either contains what dhclient # originally put there or some more up-to-date information provided by # somebody else (such as vpnc). # # The only case I know of where this script fails is if you are using # the nameserver specified by your VPN server and the local DHCP server # provides a new nameserver in a RENEW request. In that case, resolv.conf # will be overwritten. However, this case should be pretty rare and it's # important to preserve correct behavior in the more common case of getting # new nameservers in a RENEW request and not using vpnc. if [ "$old_domain_name_servers" = "$new_domain_name_servers" -a "$reason" = "RENEW" ]; then unset new_domain_name_servers echo "Removing new name server" >> /tmp/dhclient-script.debug fi