You are not logged in.
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
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
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
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