public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: YoYo Siska <yoyo@gl.ksp.sk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Override DHCP-provided DNS
Date: Wed, 15 Jun 2011 16:27:26 +0200	[thread overview]
Message-ID: <20110615142725.GA20949@ksp.sk> (raw)
In-Reply-To: <4DF8BCAF.2090804@binarywings.net>

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



  reply	other threads:[~2011-06-15 14:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 14:07 [gentoo-user] Override DHCP-provided DNS Florian Philipp
2011-06-15 14:27 ` YoYo Siska [this message]
2011-06-15 15:40   ` Juan Diego Tascón
2011-06-15 18:53     ` Dale
2011-06-15 19:21       ` Florian Philipp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110615142725.GA20949@ksp.sk \
    --to=yoyo@gl.ksp.sk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox