You are not logged in.

#1 2008-10-15 05:55:47

FLCLFan
Member
Registered: 2008-07-21
Posts: 76
Website

New dhcpcd doesnt support "-R"??

Well today I updated my dhcpcd to version 4 from the repos and now when I boot, it fails saying it doesnt know what "R" is and I have no internet until I manually call up dhcpcd.

But, I use Opendns so I have been using

DHCPCD_ARGS="-R -t 30 -h $HOSTNAME"

in my '/etc/conf.d/dhcpcd' so it doesnt overwrite my '/etc/resolv.conf' with the opendns nameservers in it.

Now, what do I do now?

Last edited by FLCLFan (2008-10-15 05:57:06)

Offline

#2 2008-10-15 07:39:16

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: New dhcpcd doesnt support "-R"??

man dhcpcd

−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

in your case DHCPCD_ARGS="-t 30 -h $HOSTNAME -C resolv.conf"

Last edited by wonder (2008-10-15 07:40:16)


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2008-10-15 19:17:21

QwertyManiac
Member
Registered: 2008-10-05
Posts: 6

Re: New dhcpcd doesnt support "-R"??

I noticed the .head and .tail entries in /etc/resolv.conf and thus I created a file /etc/resolv.conf.head (Alongside the existing resolv.conf.auto, as it has been mentioned) and entered my nameserver <IP> stuff in that.

It automatically pastes the same into the /etc/resolv.conf when started from then on. The -L option perhaps does this thing, I found that alone to be new.

Last edited by QwertyManiac (2008-10-15 19:17:57)

Offline

#4 2008-10-15 22:10:09

FLCLFan
Member
Registered: 2008-07-21
Posts: 76
Website

Re: New dhcpcd doesnt support "-R"??

wonder wrote:

man dhcpcd

−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

in your case DHCPCD_ARGS="-t 30 -h $HOSTNAME -C resolv.conf"

That works. Thanks big_smile

Updated the wiki with it too.

Offline

#5 2008-11-10 11:14:08

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: New dhcpcd doesnt support "-R"??

FLCLFan wrote:
wonder wrote:

man dhcpcd

−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

in your case DHCPCD_ARGS="-t 30 -h $HOSTNAME -C resolv.conf"

That works. Thanks big_smile

Updated the wiki with it too.

Does not work here. This survives a /etc/rc.d/network restart, but it still overwrites resolv.conf on restart of adsl connection.

Last edited by Rasi (2008-11-10 11:16:14)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#6 2008-11-10 11:52:05

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: New dhcpcd doesnt support "-R"??

See QwertyManiac's post

Offline

#7 2008-11-10 11:58:53

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: New dhcpcd doesnt support "-R"??

iphitus wrote:

See QwertyManiac's post

I have that .head file.. that never worked for me.. with or without -L option didnt matter

bash-3.2# cat /etc/conf.d/dhcpcd
#
# Arguments to be passed to the DHCP client daemon
#
DHCPCD_ARGS="-q "

bash-3.2# cat /etc/resolv.conf.head
 # Route DNS requests through dnsmasq first
nameserver 127.0.0.1
# First OpenDNS server
nameserver 208.67.222.222
# Second OpenDNS server
nameserver 208.67.220.220

bash-3.2# /etc/rc.d/adsl stop
:: Stopping ADSL Connection                                                                                     [DONE]

bash-3.2# /etc/rc.d/network restart
:: Stopping Network                                                                                             [DONE]
:: Starting Network                                                                                             [DONE]

bash-3.2# /etc/rc.d/adsl start
:: Starting ADSL Connection                                                                                     [DONE]

bash-3.2# cat /etc/resolv.conf
nameserver 62.109.123.7
nameserver 213.191.92.86
bash-3.2#

*edit* the very same line works for someone in #archlinux o_O

Last edited by Rasi (2008-11-10 12:15:22)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#8 2008-11-10 12:20:51

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: New dhcpcd doesnt support "-R"??

right.. i simply changed my adsl setup to NOT receive any dns servers. Now it works fine with the -C option


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

Board footer

Powered by FluxBB