You are not logged in.

#1 2010-04-16 08:22:51

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

[SOLVED] dhcpcd upgrade causes syntax error

Hi,

After upgrading from dhcpcd 3.1.4-2 to 3.2.1-1 I get a syntax error while starting the network:

:: Starting Network
sbin/dhcpcd: Invalid option -- 'C'

/etc/conf.d/dhcpcd:

DHCPCD_ARGS="-C resolv.conf -q"

The above code is verbatim from http://wiki.archlinux.org/index.php/Resolv.conf

I had no luck googling for the error.
What is the "current" syntax for preventing dhcpcd from overwriting resolv.conf?
Can anyone help?

Last edited by bitpal (2010-04-16 09:56:23)

Offline

#2 2010-04-16 08:36:41

tvale
Member
From: Portugal
Registered: 2008-12-11
Posts: 175

Re: [SOLVED] dhcpcd upgrade causes syntax error

A quick man reading led me to believe your desired options resides in the hooks functionality now. Check man dhcpcd-run-hooks and the file /usr/lib/dhcpcd/dhcpcd-hooks/20-resolv.conf.

I believe changing it to -C 20-resolv.conf -q will do the deed.

Offline

#3 2010-04-16 08:50:25

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] dhcpcd upgrade causes syntax error

tvale wrote:

A quick man reading led me to believe your desired options resides in the hooks functionality now. Check man dhcpcd-run-hooks and the file /usr/lib/dhcpcd/dhcpcd-hooks/20-resolv.conf.

man page not found and the 20-resolv.conf file doesn't exist.

I changed to -C 20-resolv.conf -q, but the syntax error remains and the network deamon fails.

What now?

Offline

#4 2010-04-16 09:55:04

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] dhcpcd upgrade causes syntax error

I found a solution, not to the syntax error, but this works:

Solution: set up a static ip

see: http://wiki.archlinux.org/index.php/Con … _Static_IP
and: http://wiki.archlinux.org/index.php/Resolv.conf

/etc/conf.d/dhcpcd:
    comment out offending line
    (it was supposed to prevent dhcpcd from overwriting /etc/resolv.conf):
    #DHCPCD_ARGS="-C resolv.conf -q"

/etc/rc.conf:
    eth0="eth0 192.168.2.99 netmask 255.255.255.0 broadcast 192.168.2.255"
    gateway="default gw 192.168.2.2"
    ROUTES=(gateway)

dhcpcd will still overwrite resolv.conf, but the nameserver it puts in (the ip of the router, 192.168.2.2) works for dns.

Thanks, tvale, for your try!

Offline

Board footer

Powered by FluxBB