Submitted By: Jonathan Oksman (jonathan.oksman at gmail dot com)
Date: 2006-09-29
Initial Package Version: 3.0.2
Origin: Jürg Billeter's dhcp-3.0.3-dns-1.patch
Description: Allows the client script to properly update resolv.conf when
the server/router fails to send a domain name.
Upstream Status: Not submitted
old
|
new
|
|
23 | 23 | # of the $1 in its args. |
24 | 24 | |
25 | 25 | make_resolv_conf() { |
26 | | if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then |
27 | | echo search $new_domain_name >/etc/resolv.conf |
| 26 | if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then |
| 27 | echo "; resolv.conf - generated by dhclient-script" >/etc/resolv.conf |
28 | 28 | chmod 644 /etc/resolv.conf |
29 | | for nameserver in $new_domain_name_servers; do |
30 | | echo nameserver $nameserver >>/etc/resolv.conf |
31 | | done |
| 29 | if [ "x$new_domain_name" != x ]; then |
| 30 | echo search $new_domain_name >>/etc/resolv.conf |
| 31 | fi |
| 32 | if [ "x$new_domain_name_servers" != x ]; then |
| 33 | for nameserver in $new_domain_name_servers; do |
| 34 | echo nameserver $nameserver >>/etc/resolv.conf |
| 35 | done |
| 36 | fi |
32 | 37 | fi |
33 | 38 | } |
34 | 39 | |