From owner-freebsd-bugs Wed Jan 30 15: 0: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D98F037B400 for ; Wed, 30 Jan 2002 15:00:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0UN02f18297; Wed, 30 Jan 2002 15:00:02 -0800 (PST) (envelope-from gnats) Date: Wed, 30 Jan 2002 15:00:02 -0800 (PST) Message-Id: <200201302300.g0UN02f18297@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "brian j. peterson" Subject: Re: misc/34455: [PATCH] /sbin/dhclient-script overwrites /etc/resolv.conf without any relevant information Reply-To: "brian j. peterson" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/34455; it has been noted by GNATS. From: "brian j. peterson" To: FreeBSD-gnats-submit@freebsd.org Cc: Ceri Subject: Re: misc/34455: [PATCH] /sbin/dhclient-script overwrites /etc/resolv.conf without any relevant information Date: Wed, 30 Jan 2002 15:50:02 -0700 On Wed, Jan 30, 2002 at 10:06:04PM +0000, Ceri wrote: > On Wed, Jan 30, 2002 at 01:10:02PM -0800, brian j. peterson wrote: > > am i wrong to expect this script to not clobber important files with > > useless information? > > I don't know. > I think a modification like this should really be done locally in > /etc/dhclient-enter-hooks, as per dhclient-script.5 : > > When it starts, the client script first defines a shell > function, make_resolv_conf , which is later used to create > the /etc/resolv.conf file. To override the default > behaviour, redefine this function in the enter hook > script. > > This opinion is mainly formed due to the difference in our perceptions of > what the patch actually does. It suits your position, but it's not friendly > to anyone who might want to roll out empty /etc/resolv.conf's for whatever > reason. i consider the default behavior of /etc/dhclient-script to be bordering on destructive in this case. imho, default behavior shouldn't be destructive. if someone wants to do something specific like roll out empty copies of /etc/resolv.conf, shouldn't THEY be using /etc/dhclient-enter-hooks as a means to achieve this? i realize i am asking for a modification of long-standing default behavior here, but i wouldn't be making the request if i didn't think it was warranted. is it by design that the default make_resolv_conf() in dhclient-script overwrites /etc/resolv.conf every single time, no matter what the circumstances? if so, can someone enlighten me as to the motivation behind that design decision? -brian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message