Re: dhclient trashes my resolv.conf

From: Tobias Roth <roth_at_iam.unibe.ch>
Date: Thu, 28 Oct 2004 21:13:24 +0200
On Thu, Oct 28, 2004 at 05:47:51PM +0200, Oliver Lehmann wrote:
> Oliver Lehmann wrote:
> 
> > I've tried supersede domain-name-servers ""; in /etc/dhclient.conf, But
> > that seems to have no effect. I can't see any other way to prevent
> > dhclient from touching my resolv.conf in that man page. Maybe you can
> > point me?
> > 
> > man 8 dhclient-script says
> > 
> > HOOKS
> >        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.
> > 
> 
> Martin,
> 
> do you think, it is a good solution to overwrite the function definition
> to prevent overwriting your resolv.conf? Wouldn't be a rc.conf parameter
> easier for beginners to "get", and more stringent to the whole system of
> configuration?
> What do others think?

I think not. If dhclient (or any other daemon started from within rc.d/)
doesn't make it possible to prevent overwriting of resolv.conf by means
of command line arguments, then rc.conf is not the place to fix that.
You cannot have rc.conf knobs for every option of every daemon in the base
system, that's what the daemons config files are for.

cheers, t.
Received on Thu Oct 28 2004 - 17:13:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:20 UTC