diff options
Diffstat (limited to 'client/scripts/linux')
-rwxr-xr-x | client/scripts/linux | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/client/scripts/linux b/client/scripts/linux index 31ddd2fe..787efff2 100755 --- a/client/scripts/linux +++ b/client/scripts/linux @@ -23,12 +23,22 @@ # of the $1 in its args. make_resolv_conf() { - if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then - echo search $new_domain_name >/etc/resolv.conf - chmod 644 /etc/resolv.conf + if [ x"$new_domain_name_servers" != x ]; then + cat /dev/null > /etc/resolv.conf.dhclient + chmod 644 /etc/resolv.conf.dhclient + if [ x"$new_domain_search" != x ]; then + echo search $new_domain_search >> /etc/resolv.conf.dhclient + elif [ x"$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. + echo search $new_domain_name >> /etc/resolv.conf.dhclient + fi for nameserver in $new_domain_name_servers; do - echo nameserver $nameserver >>/etc/resolv.conf + echo nameserver $nameserver >>/etc/resolv.conf.dhclient done + + mv /etc/resolv.conf.dhclient /etc/resolv.conf fi } |