Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2002 13:10:02 -0800 (PST)
From:      "brian j. peterson" <rbw@myplace.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/34455: [PATCH] /sbin/dhclient-script overwrites /etc/resolv.conf without any relevant information
Message-ID:  <200201302110.g0ULA2394068@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/34455; it has been noted by GNATS.

From: "brian j. peterson" <rbw@myplace.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Ceri <setantae@submonkey.net>
Subject: Re: misc/34455: [PATCH] /sbin/dhclient-script overwrites /etc/resolv.conf without any relevant information
Date: Wed, 30 Jan 2002 14:04:31 -0700

 On Wed, Jan 30, 2002 at 06:28:07PM +0000, Ceri wrote:
 > Strikes me as pilot error to be honest.
 > If the DCHP server doesn't provide nameservers, and you're not overriding them,
 > then you'll end up with nothing there.
 > 
 > If you wish to insert some information into /etc/resolv.conf,
 > that's what the supersede statement in dhclient.conf is for, viz.
 > 
 > # cat /etc/dhclient.conf
 > interface "ed0" {
 > 	supersede domain-name "private.submonkey.net";
 > 	prepend domain-name-servers 192.168.10.1;
 > }
 
 admittedly, there are ways around this problem, but the fact is that
 dhclient-script is overwriting /etc/resolv.conf regardless of whether
 or not it has useful data to write to it.  my trivial patch solves this
 problem by not writing to /etc/resolv.conf if there's no reason to.
 (the script simply checks to see if a certain variable has a value or
 not, and writes to /etc/resolv.conf only if the variable has a value.)
 
 i prefer, at this point, to create my own /etc/resolv.conf, and since i'm
 not requesting any domain-name or domaina-name-servers information, i
 don't think dhclient-script has any business overwriting /etc/resolv.conf
 with "search \n".
 
 am i wrong to expect this script to not clobber important files with
 useless information?
 
 -brian

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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