You are not logged in.

#1 2009-03-31 16:49:38

feliperibeiro
Member
From: Rio de Janeiro, Brazil
Registered: 2009-03-31
Posts: 6

[SOLVED] dhcpcd insists on overwriting /etc/resolv.conf

Hi everybody!

I was having some slow DNS lookups and so decided to install dnsmasq to try to solve the problem.

After following the instructions here I got some really good improvement.
The problem is that dhcpcd keeps on overwriting my /etc/resolv.conf every time I restart the system, even though I have /etc/conf.d/dhcpcd set not to let it happen.

I did some research here on the forum and Google but didn't find anything to solve the problem. Most people seem to solve their problems simply by adding '-C resolv.conf' to the DHCPCD_ARGS line in /etc/conf.d/dhcpcd, but mine is already like this.

Thanks in advance!

Last edited by feliperibeiro (2009-04-03 01:07:29)

Offline

#2 2009-03-31 18:01:22

sparchy
Member
From: arizona, usa
Registered: 2007-11-20
Posts: 32

Re: [SOLVED] dhcpcd insists on overwriting /etc/resolv.conf

I got mine to stop updating /etc/resolv.conf by entering the full hook name which is in /usr/lib/dhcpcd/dhcpcd-hooks.  Here is what I put in my dhcpcd conf.d file
#
# Arguments to be passed to the DHCP client daemon
#

DHCPCD_ARGS="-q -C 20-resolv.conf"

Offline

#3 2009-03-31 18:22:17

RobertoVanto
Member
From: Chiampo(VI) - Italy
Registered: 2008-09-04
Posts: 32
Website

Re: [SOLVED] dhcpcd insists on overwriting /etc/resolv.conf

Here's my /etc/conf.d/dhcpcd:

DHCPCD_ARGS="-t 30 -h $HOSTNAME -C resolv.conf -C mtu eth0"


Love, and do what thou wilt  - St. Augustine of Hippo

Offline

#4 2009-04-01 03:22:54

feliperibeiro
Member
From: Rio de Janeiro, Brazil
Registered: 2009-03-31
Posts: 6

Re: [SOLVED] dhcpcd insists on overwriting /etc/resolv.conf

I tried both methods and neither worked.
I did find out something though.

When I remove the search directive from /etc/resolv.conf, dhcpcd doesn't overwrite the file. The wiki says to leave the search directive as it is, but when I do, the file is always overwritten.

I did some research on the meaning of the search directive but couldn't decide whether it is essential in resolv.conf or not.
Does anybody know if this directive is essential? What happens if I take it out?

Thank you for your responses!

Offline

#5 2009-04-01 05:19:09

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED] dhcpcd insists on overwriting /etc/resolv.conf

check the dnsmasq wiki page


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#6 2009-04-03 01:06:44

feliperibeiro
Member
From: Rio de Janeiro, Brazil
Registered: 2009-03-31
Posts: 6

Re: [SOLVED] dhcpcd insists on overwriting /etc/resolv.conf

Gen2ly wrote:

check the dnsmasq wiki page

I had already seen the dnsmasq wiki page but it doesn't say anything about how to make dhcpcd not to touch /etc/resolv.conf.
I ended up using /etc/resolv.conf.head and /etc/resolv.conf.tail to add lines to /etc/resolv.conf and it's working just fine now.

I just don't understand why the solution given on the wiki doesn't work here. hmm

Offline

Board footer

Powered by FluxBB