From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QWr62-0007HL-G4 for garchives@archives.gentoo.org; Wed, 15 Jun 2011 14:29:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3C4D1C032; Wed, 15 Jun 2011 14:28:08 +0000 (UTC) Received: from ksp.sk (element.ksp.sk [158.195.16.154]) by pigeon.gentoo.org (Postfix) with ESMTP id AF7791C032 for ; Wed, 15 Jun 2011 14:28:08 +0000 (UTC) Received: by ksp.sk (Postfix, from userid 1004) id 9D0CF4C1DB; Wed, 15 Jun 2011 16:28:07 +0200 (CEST) Date: Wed, 15 Jun 2011 16:27:26 +0200 From: YoYo Siska To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Override DHCP-provided DNS Message-ID: <20110615142725.GA20949@ksp.sk> References: <4DF8BCAF.2090804@binarywings.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DF8BCAF.2090804@binarywings.net> X-YoYo: 47 X-Exotic-Header-Data: 47/2 User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: X-Archives-Hash: 0b5a9888ad57aff01f5098404dbd1368 On Wed, Jun 15, 2011 at 04:07:43PM +0200, Florian Philipp wrote: > Hello list! > > for some wireless access points, I want to get an IP via DHCP but not > use the provided DNS-server (I use an openvpn setup with its own DNS > server, domain name, etc.). > > In /usr/share/doc/openrc-0.8.2-r1/net.example it reads: > # Setting name/domain server causes /etc/resolv.conf to be overwritten > # Note that if DHCP is used, and you want this to take precedence then > # please put -R in your dhcpcd options > > But dhcpcd does not seem to have a -R option. It does have a --static > option, though. While this is good enough for simply setting the DNS > server, it does not seem to allow specifying domain names or > search-domains (at least it is not shown in the man-page). > > Please tell me what the proper way is and whether the mention of "-R" is > a documentation bug. > > Thanks in advance, > Florian Philipp from the man page, this seems to do what you want (never tried, i use dhclient and its /etc/dhcp/dhclient.conf): -C, --nohook script Don't run this hook script. Matches full name, or prefixed with 2 numbers optionally ending with .sh. So to stop dhcpcd from touching your DNS or MTU settings you would do:- dhcpcd -C resolv.conf -C mtu eth0 yoyo