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 1QWvFR-00018K-1a for garchives@archives.gentoo.org; Wed, 15 Jun 2011 18:55:29 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C00B61C081; Wed, 15 Jun 2011 18:53:44 +0000 (UTC) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.213.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 91C171C081 for ; Wed, 15 Jun 2011 18:53:44 +0000 (UTC) Received: by yxd30 with SMTP id 30so650507yxd.40 for ; Wed, 15 Jun 2011 11:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=vDOEHweL/QsNhz8PYBR2D5pSMALYW0Gevys6SkA7RU4=; b=iASoAexYV5UdIWTCxv/UI79kEnxtda7/Wm7CyvW9p+HM8/dxM2JqaxVMTtcMs29kuC mHSGDr5M645/IJmdswo7hAiX8E6Qbw9IpdFgJrk6oKG3IfqkVdi9lb+iY7fvf8jLIAPE nHVhiC23yt/t5w3Qp/8ilPvIukEF9BKELE9xE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=XkHxg//JZKD3mQ1hnCXOscBPzzWOEB1acQ7SGAOuXkRHlfc6Up8JgCqp4AewFuB4cT WOjNxc905DVl65t8xIprfx/VLSUjg+0w7gaCxg8zFvZMJuaaHjPqsHAaLh58gZlp61vh /MekcAr6xWcIWsjejnN4oKL1LqXnfAuAKTkoE= Received: by 10.100.55.32 with SMTP id d32mr114603ana.42.1308164023847; Wed, 15 Jun 2011 11:53:43 -0700 (PDT) Received: from [192.168.2.5] (adsl-65-0-122-125.jan.bellsouth.net [65.0.122.125]) by mx.google.com with ESMTPS id x32sm671551anx.6.2011.06.15.11.53.42 (version=SSLv3 cipher=OTHER); Wed, 15 Jun 2011 11:53:43 -0700 (PDT) Message-ID: <4DF8FFB5.3020108@gmail.com> Date: Wed, 15 Jun 2011 13:53:41 -0500 From: Dale User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.19) Gecko/20110606 Gentoo/2.0.14-r1 SeaMonkey/2.0.14 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 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Override DHCP-provided DNS References: <4DF8BCAF.2090804@binarywings.net> <20110615142725.GA20949@ksp.sk> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: acac702924ae8c7111a196f6263a489f Juan Diego Tasc=C3=B3n wrote: > On Wed, Jun 15, 2011 at 9:27 AM, YoYo Siska wrote: > =20 >> On Wed, Jun 15, 2011 at 04:07:43PM +0200, Florian Philipp wrote: >> =20 >>> 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 overwritte= n >>> # Note that if DHCP is used, and you want this to take precedence the= n >>> # 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 >>> =20 >> 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 prefix= ed 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 >> >> >> =20 > I use the google dns servers so I created a /etc/resolv.conf file and > set the i attribute on it: > > chattr +i /etc/resolv.conf > > that way it can't be removed or overwritten and you won't have that > problem no matter what dhcp client you are using > > > =20 Does this still work? config_eth0=3D( "dhcp" ) dhcp_eth0=3D"nodns" dns_servers_eth0=3D"8.8.8.8 8.8.4.4" This worked before the openrc update but I guess it still does. Someone=20 speak up if it doesn't. Hope that helps. Dale :-) :-)