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 1OmjPM-0001UB-Gy for garchives@archives.gentoo.org; Sat, 21 Aug 2010 08:26:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A9BA0E0684; Sat, 21 Aug 2010 08:26:14 +0000 (UTC) Received: from mail-yw0-f53.google.com (mail-yw0-f53.google.com [209.85.213.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 85FA1E0684 for ; Sat, 21 Aug 2010 08:26:14 +0000 (UTC) Received: by ywp4 with SMTP id 4so1374706ywp.40 for ; Sat, 21 Aug 2010 01:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=WWKIDFL/zFcFNJ8oTtp57AsoFBB/rZITOIvmL/degcU=; b=jY9j5XciyjB0LCKID9JiPMZmEYCkv+Yvp7f12MPaOTCw1IVe4nzIk7LbXupOO54ly4 6h5qwHNBnKQPGU4t/0mvHv5SUdVg73cGwq7eckWvpMRTwfnMwb0PkANXTGee1Lg63L8x GxP5u0GU/m1e7i4kiOo4rTtwVDQNttAMeKA/I= 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=ny+kMib/4JK4cwoynm0elJD3463yunxFDsS7WsGhhFkM/iVrZm90Hhn2aU/X9PGmXI 80EY2tqMhOxSR0yrhKvgCyNNHIEORvzVSyrMhY/R5WKFR4JF6DwlYOq3QuSQ5cLBffWG L+z4HYNhUQ6yTf0lJqyya9d4pMjINvoJZyUW8= Received: by 10.100.137.11 with SMTP id k11mr2833396and.103.1282379174148; Sat, 21 Aug 2010 01:26:14 -0700 (PDT) Received: from [192.168.1.2] (adsl-0-123-240.jan.bellsouth.net [65.0.123.240]) by mx.google.com with ESMTPS id k11sm6169543ani.10.2010.08.21.01.26.11 (version=SSLv3 cipher=RC4-MD5); Sat, 21 Aug 2010 01:26:13 -0700 (PDT) Message-ID: <4C6F8DA2.1030805@gmail.com> Date: Sat, 21 Aug 2010 03:26:10 -0500 From: Dale User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100801 Gentoo/2.0.6 SeaMonkey/2.0.6 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] DHCPCD and nameserver References: <4C6F6F2B.80906@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 8e2d5954-5cd7-4695-837f-e259bbb5e4bd X-Archives-Hash: 423f49d88f0c5d05f72110fa213cc3b6 Jorge Almeida wrote: >> I'm trying to get my nameserver setting to stick in resolv.conf when I >> restart the network or reboot. Layman will not work with my ISP's DNS >> server for some crazy reason. Anyway, I have this in /etc/conf.d/net file: >> >> > Dale, > if I understood correctly, you want to set the contents of > /etc/resolv.conf and don't want dhcp to overwrite ir. Right? > Yep, that is what I want. DHCP just keeps overriding my file. > >> modules="dhcpcd" >> config_eth2="dhcp" >> dns_servers_eth2="nameserver 8.8.8.8 nameserver 8.8.4.4" >> >> As you can see I need it set to 8.8.8.8 but it doesn't seem to see my >> setting. After I restart my network, it updates resolv.conf to this: >> >> > I don't know about dhcpcd, but I'm using dhclient, and it works like this: > $cat /etc/resolv.conf > config_eth0=("dhcp") > modules_eth0=("dhclient") > dhcp_eth0="nodns" > > I'm not sure the last line is necessary. > Then: > > $ cat /etc/dhcp/dhclient.conf > append option domain-name-servers 127.0.0.1 > > Substitute 127.0.0.1 by 8.8.8.8 > > HTH > > Jorge > I kept playing with this because I did it once before and knew it could be done. I did finally figure out how to get it to work. It appears the syntax has changed a little bit. This is what I ended up with after some trial and error, maybe a little tooth pulling too. ;-) This is my net file: modules="dhcpcd" config_eth2="dhcp" dhcp_eth2="nodns" dns_servers_eth2="8.8.8.8 8.8.4.4" Now I get this in resolv.conf: root@smoker / # cat /etc/resolv.conf # Generated by net-scripts for interface eth2 nameserver 8.8.8.8 nameserver 8.8.4.4 root@smoker / # So, it's working now. It's not quite the same config as last time but it works. Thanks. Dale :-) :-)