Skip site navigation (1)Skip section navigation (2)
Date:      30 May 2003 14:46:29 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com>
To:        T Kellers <kellers@njit.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: how to stop resolv.conf from being updated
Message-ID:  <44add48e7u.fsf@be-well.ilk.org>
In-Reply-To: <200305301440.29266.kellers@njit.edu>
References:  <006e01c326d8$8030f770$1916c60a@win2k.clickcom.com> <200305301440.29266.kellers@njit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
T Kellers <kellers@njit.edu> writes:

> A sledgehammer approach to make it work:
> 
> Comment out the following lines from /sbin/dhclient-script
> 
> make_resolv_conf() {
>   if [ x"$new_domain_name_servers" != x ]; then
>     if [ "x$new_domain_name" != x ]; then
>       echo search $new_domain_name >/etc/resolv.conf
>     else
>       rm /etc/resolv.conf
>     fi
>     for nameserver in $new_domain_name_servers; do
>       echo nameserver $nameserver >>/etc/resolv.conf
>     done
>   fi
> }

Less of a sledgehammer for a similar effect:

 prepend domain-name-servers 127.0.0.1;
[or wherever your nameserver should be]
As an option in dhclient.conf(5)

You can use supersede instead, if you *really* don't want to go to the
ISP's servers, even if yours fails.



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