On 10/14/06, Dan Nicholson <[EMAIL PROTECTED]> wrote:

So, I grabbed the latest development version and diffed the scripts.
See attached. Jonathan, could you test this out? I'm sure it works,
but it would be great to get another vote of confidence.

Whoops. Diffed against he previously patched script. Here's the real diff.

--
Dan
--- dhcp-3.0.4/client/scripts/linux	2002-11-14 17:09:09.000000000 -0800
+++ dhcp-3.1.0a1/client/scripts/linux	2006-07-21 19:24:16.000000000 -0700
@@ -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
 }
 
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to