Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2004 13:57:30 -0700
From:      "David O'Brien" <obrien@freebsd.org>
To:        Oliver Lehmann <lehmann@ans-netz.de>, freebsd-current@freebsd.org
Subject:   Re: dhclient trashes my resolv.conf
Message-ID:  <20041027205730.GA59489@dragon.nuxi.com>
In-Reply-To: <20041027204852.GY95878@horsey.gshapiro.net>
References:  <20041027224512.2e3b2ae8.lehmann@ans-netz.de> <20041027204852.GY95878@horsey.gshapiro.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 27, 2004 at 01:48:52PM -0700, Gregory Neil Shapiro wrote:
> > when I start "dhclient ep1" to use DHCP for ep1, it kicks of my
> > /etc/resolv.conf which is a really bad thing. I don't want to use the NS
> > which is propagated through DHCP. That system does it's own DNS. And
> > regarding to /sbin/dhclient-script, it can't be disabled. Am I right? If
> > so, I should fill a PR, right?
> 
> Putting this in /etc/dhclient-enter-hooks should prevent any resolv.conf
> changes:
> 
> !/bin/sh
> 
> # Don't replace /etc/resolv.conf
> make_resolv_conf() {
> }

You can also use /etc/dhclient.conf to control dhclient.

# $FreeBSD: src/etc/dhclient.conf,v 1.3 2001/10/27 03:14:37 rwatson Exp $
#
#	This file is required by the ISC DHCP client.
#	See ``man 5 dhclient.conf'' for details.
#
#	In most cases an empty file is sufficient for most people as the
#	defaults are usually fine.
#
supersede domain-name "nuxi.org freebsd.org";

"domain-name-servers" is one of the knobs want to tweak.

-- 
-- David  (obrien@FreeBSD.org)



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