Patch from upstream that fixes issues with always regenerating
/etc/resolv.conf whether the DNS server has changed or not.
diff -pNur dhcp-3.0.5.orig/client/scripts/linux dhcp-3.0.5/client/scripts/linux
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 |
28 | | chmod 644 /etc/resolv.conf |
| 26 | if [ x"$new_domain_name_servers" != x ]; then |
| 27 | cat /dev/null > /etc/resolv.conf.dhclient |
| 28 | chmod 644 /etc/resolv.conf.dhclient |
| 29 | if [ x"$new_domain_search" != x ]; then |
| 30 | echo search $new_domain_search >> /etc/resolv.conf.dhclient |
| 31 | elif [ x"$new_domain_name" != x ]; then |
| 32 | # Note that the DHCP 'Domain Name Option' is really just a domain |
| 33 | # name, and that this practice of using the domain name option as |
| 34 | # a search path is both nonstandard and deprecated. |
| 35 | echo search $new_domain_name >> /etc/resolv.conf.dhclient |
| 36 | fi |
29 | 37 | for nameserver in $new_domain_name_servers; do |
30 | | echo nameserver $nameserver >>/etc/resolv.conf |
| 38 | echo nameserver $nameserver >>/etc/resolv.conf.dhclient |
31 | 39 | done |
| 40 | |
| 41 | mv /etc/resolv.conf.dhclient /etc/resolv.conf |
32 | 42 | fi |
33 | 43 | } |
34 | 44 | |