Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Oct 2004 02:25:01 -0400 (EDT)
From:      "Matthew N. Dodd" <mdodd@FreeBSD.ORG>
To:        Oliver Lehmann <lehmann@ans-netz.de>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: dhclient trashes my resolv.conf
Message-ID:  <20041028021918.J33456@sasami.jurai.net>
In-Reply-To: <20041028071001.44ad2f43.lehmann@ans-netz.de>
References:  <20041027224512.2e3b2ae8.lehmann@ans-netz.de> <20041027230039.7a5d0150.lehmann@ans-netz.de> <20041027233309.122e4207.lehmann@ans-netz.de> <20041028002251.73eae308.lehmann@ans-netz.de> <20041028071001.44ad2f43.lehmann@ans-netz.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Oct 2004, Oliver Lehmann wrote:
> Problem is, I have "options" in my resolv.conf which will be still lost 
> then.

I'm using something like the following (actually what I'm using 
regenerates named.conf and reloads the nameserver but we won't go into 
that).

Index: dhclient-script.sh
===================================================================
RCS file: /home/cvs/ncvs/src/sbin/dhclient/dhclient-script.sh,v
retrieving revision 1.2
diff -u -u -r1.2 dhclient-script.sh
--- dhclient-script.sh	1 Feb 2002 18:46:58 -0000	1.2
+++ dhclient-script.sh	18 Sep 2003 02:31:51 -0000
@@ -83,7 +83,8 @@
  #############################################################################
  make_resolv_conf ()
  {
-   if [ "x$new_domain_name" != x ] && [ "x$new_domain_name_servers" != x ]; then
+   if [ ! -f /etc/dhclient-no-resolv-conf ] &&
+      [ "x$new_domain_name" != x ] && [ "x$new_domain_name_servers" != x ]; then
       echo search $new_domain_name >/etc/resolv.conf
       for nameserver in $new_domain_name_servers; do
         echo nameserver $nameserver >>/etc/resolv.conf

-- 
10 40 80 C0 00 FF FF FF FF C0 00 00 00 00 10 AA AA 03 00 00 00 08 00



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041028021918.J33456>