You are not logged in.

#1 2008-10-01 08:39:09

Edmond
Member
Registered: 2008-10-01
Posts: 17

netcfg2 + dhcpcd not working anymore

Hello,

I recently updated my Arch installation. Now, when I run netcfg2 $profilename, the invocation of dhcpcd fails ("dhcpcd: invalid option -- 'R'").

So, I removed the "R" parameter from /etc/conf.d/dhcpcd. But I still get the same error message when trying to use netcfg2! Where else could a change in the configuration be needed?

Thanks in advance :)

Edit:
No DHCP_OPTIONS are set in /etc/network.d/$profilename.

Last edited by Edmond (2008-10-01 09:12:00)

Offline

#2 2008-10-01 09:39:24

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: netcfg2 + dhcpcd not working anymore

The hard question is why did that option disappear from dhcpcd? It means don't touch the /etc/resolv.conf file. When you run dhcpcd manually, does it still accept the switch --nodns? Maybe they've made that option a compile-time option. and the dhcpcd package needs to be rebuilt. Or maybe they really did pull it. Don't know why.

With netcfg, the calls to dhcpcd are all in /usr/lib/network/ethernet.subr. It looks like netcfg reads DHCP_OPTIONS from your profile (so -R should not be set there), and if you have DNS1 set, it adds -R to DHCP_OPTIONS. So you should not have DNS1 set; or you'll need to edit that netcfg library script. If you mess it up, you can just reinstall netcfg.

Offline

#3 2008-10-01 09:51:38

Edmond
Member
Registered: 2008-10-01
Posts: 17

Re: netcfg2 + dhcpcd not working anymore

Profjim wrote:

When you run dhcpcd manually, does it still accept the switch --nodns?

Nope. Neither -R nor --nodns is working.

if you have DNS1 set, it adds -R to DHCP_OPTIONS.

That's it: Removed my DNSn entries from the profile file, and it is working now.

Unfortunately, my resolv.conf now does not contain the desired entries, since the -R switch was removed from dhcpcd.

Offline

#4 2008-10-01 09:53:22

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

Re: netcfg2 + dhcpcd not working anymore

oh great.

Yeah, looks like it doesnt accept -R at all. Crap.

Expect 2.1.2 later on.

Offline

#5 2008-10-01 11:18:44

Edmond
Member
Registered: 2008-10-01
Posts: 17

Re: netcfg2 + dhcpcd not working anymore

Maybe the behavior can be resembled using the -C switch:
From the manpage:

-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

Offline

#6 2008-10-01 16:56:29

Edmond
Member
Registered: 2008-10-01
Posts: 17

Re: netcfg2 + dhcpcd not working anymore

Edmond wrote:

Maybe the behavior can be resembled using the -C switch:

Hm, no, doesn't work for me.

What _does_ work, however, is placing a copy of my desired resolv.conf entries in /etc/resolv.conf.head.
dhcpcd will still modify the original resolv.conf, but the content of the resolv.conf.head file is being inserted at the top of (the modified) resolv.conf.

(This also works with placing entries at the bottom: Just put them in /etc/resolv.conf.tail)

Offline

#7 2008-10-02 19:44:42

rodland
Member
From: Ourense
Registered: 2006-01-14
Posts: 12
Website

Re: netcfg2 + dhcpcd not working anymore

I also have the same problem, netcfg2 and dhcpcd don't work after a recent upgrade. This happens on my desktop and on my laptop too.

Offline

#8 2008-10-04 09:32:59

Edmond
Member
Registered: 2008-10-01
Posts: 17

Re: netcfg2 + dhcpcd not working anymore

dhcpcd 4.0.2 is out. In this release, the 'R' switch has obviously been superseeded by the corresponding nohook-script (--nohook/-C resolv.conf):

case 'R':
        [...]
            add_environ(options, "skip_hooks=resolv.conf", 0);
            break;

The 'H', 'M', 'N', 'R', 'S' and 'Y' switches are only compiled in if CMDLINE_COMPAT is true.

#ifdef CMDLINE_COMPAT

Last edited by Edmond (2008-10-04 09:35:52)

Offline

#9 2008-10-07 13:19:08

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: netcfg2 + dhcpcd not working anymore

Iph, I tried 2.1.2 from testing today and got an error:

sudo /etc/rc.d/net-profiles start
:: zangetsu up                                                               [BUSY]
dhcpcd: invalid option -- 'q'

Needless to say it failed.

Offline

#10 2008-10-07 13:54:23

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

Re: netcfg2 + dhcpcd not working anymore

dtw wrote:

Iph, I tried 2.1.2 from testing today and got an error:

sudo /etc/rc.d/net-profiles start
:: zangetsu up                                                               [BUSY]
dhcpcd: invalid option -- 'q'

Needless to say it failed.

oh... known bug, the one in testing depends on dhcpcd 4.x in testing. I havn't had an opportunity to add it to the deps line

Last edited by iphitus (2008-10-07 13:56:20)

Offline

#11 2008-10-16 10:38:47

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

Re: netcfg2 + dhcpcd not working anymore

So can anyone tell me what to do, to have opendns working again?

I have a direct internet connection on a single workstation without router or anything. My resolv.conf is overwritten all the time.


I tried to create a /etc/resolv.conf.head file, but that didnt do anything...

Last edited by Rasi (2008-10-16 10:42:34)


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