# [Solved] dhcpcd problem: invalid option -- 'R'

## tskuzzy

I updated my system (which I assume upgraded dhcpcd) and now my networking fails to start automatically when I run "/etc/init.d/net.eth0 start"

The error I get is:

```
# /etc/init.d/net.eth0 start

 * Service net.eth0 starting

/sbin/dhcpcd: invalid option -- 'R'

usage: dhcpcd [-deknpqxyADEGHKLOTV] [-c script] [-f file ] [-h hostname]

              [-i classID ] [-l leasetime] [-m metric] [-o option] [-r ipaddr]

              [-s ipaddr] [-t timeout] [-u userclass] [-F none|ptr|both]

              [-I clientID] [-C hookscript] [-Q option] [-X ipaddr] <interface>                                                                                                                      [ !! ]

 * ERROR:  net.eth0 failed to start
```

When I manually run dhcpcd without any options it works fine. How can I remove the -R option from the script (I can't seem to find it)?Last edited by tskuzzy on Sat Jul 25, 2009 6:16 pm; edited 1 time in total

----------

## Mike Hunt

What output do you get from 

```
# grep dhcpcd /etc/init.d/*
```

  :Question: 

Just in case also try 

```
# alias | grep dhcpcd
```

And post the output of 

```
# cat /etc/dhcpcd.conf
```

----------

## UberLord

You probably have dhcp="nodns" or similar in /etc/conf.d/net

baselayout-1 does not support all dhcpcd options, and only dhcpcd-4 with the compat use flag enabled.

----------

## tskuzzy

 *UberLord wrote:*   

> You probably have dhcp="nodns" or similar in /etc/conf.d/net
> 
> baselayout-1 does not support all dhcpcd options, and only dhcpcd-4 with the compat use flag enabled.

 

Yes I am using the nodns option and I do have dhcpcd compiled with the compat use flag.

Do you have a solution? Ideally I would like to continue using baselayout-1 without having to migrate to 2.0.

@Mike Hunt:

grep dhcpcd /etc/init.d/*

```
# grep dhcpcd /etc/init.d/*

/etc/init.d/dhcpcd:command=/sbin/dhcpcd

/etc/init.d/dhcpcd:pidfile=/var/run/dhcpcd.pid

/etc/init.d/net.eth0:   local -a pmods=( "iproute2" "dhcpcd" "iwconfig" "netplugd" )

/etc/init.d/net.eth0:   # So if the user specifies pump then we don't use dhcpcd

/etc/init.d/net.lo:     local -a pmods=( "iproute2" "dhcpcd" "iwconfig" "netplugd" )

/etc/init.d/net.lo:     # So if the user specifies pump then we don't use dhcpcd
```

dhcpcd is not aliased

/etc/dhcpcd.conf (removed comments from file)

```
# cat /etc/dhcpcd.conf

hostname

option ntp_servers

option interface_mtu

require dhcp_server_identifier

nohook lookup-hostname
```

----------

## UberLord

So your choices are

1) Upgrade from baselayout-1 to OpenRC

2) Edit /etc/dhcpcd.conf to stop handling DNS or touching resolv.conf (man dhcpcd.conf for more info)

3) Downgrade to dhcpcd-4

----------

## tskuzzy

Thanks, I just downgraded to dhcpcd-4 since that seemed like the easiest solution.  :Smile: 

----------

