how to stop resolv.conf from being updated
kellers at njit.edu
Fri May 30 11:40:34 PDT 2003
A sledgehammer approach to make it work:
Comment out the following lines from /sbin/dhclient-script
if [ x"$new_domain_name_servers" != x ]; then
if [ "x$new_domain_name" != x ]; then
echo search $new_domain_name >/etc/resolv.conf
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf
This will prevent dhcp from making a new /etc/resolv.conf file (on boot,
re-boot). Whatever nameserver you enter in /etc/resolv.conf will stay put.
(I had to take this approach some years ago when I was using an apple airport
basestation as my gateway, and the dhcp server software kept assigning
10.0.1.1 as my nameserver in /etc/resolv.conf.)
Check the dhclient.conf man page, too, for less drastic measures.
On Friday 30 May 2003 02:22 pm, John Straiton wrote:
>You could always use chflags to make the file un-writeable... Tho' there
>is probably a better solution
>#chflags schg /etc/resolv.conf
>jks at clickcom.com
>> -----Original Message-----
>> From: owner-freebsd-questions at freebsd.org
>> [mailto:owner-freebsd-questions at freebsd.org] On Behalf Of
>> Laszlo Vagner
>> Sent: Friday, May 30, 2003 2:09 PM
>> To: questions at freebsd.org
>> Subject: how to stop resolv.conf from being updated
>> I am using DHCP on a cable modem and my
>> providers nameserver really sucks
>> but changing my resolv.conf repairs
>> the lookups for a little while then it gets
>> set back to them upon bootup.
>> how do i make it stay the way i set it.
>> freebsd-questions at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/free> bsd-questions
>> To unsubscribe, send any mail to
>> "freebsd-questions-unsubscribe at freebsd.org"
>freebsd-questions at freebsd.org mailing list
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions