# openrc sneaking udhcpc

## WWWW

hello,

Just curious about this fact.

Why would openrc try dhcpc from all programs all the way to the hidden busybox udhcpc when there's no networking set up or blank or misconfigured /etc/conf.d/net?????

WHY IS IT DEFFAULT BEHAVIOR??

Wouldn't it be more logical not to execute anything as default instead? Is not like a Gentoo user is dumb with dissability that needs a little automagic assistance to get his box online.

There's some fault in the openrc logic that a user wants and needs dhcpcd BY ALL MEANS regardless of personal preference. A little bit like systemd.

I found out the hard way when having two nics and wanted to configure the second one the bastard sneaked a nameserver ip into:

```

/etc/resolve.conf

```

And with a message:

```

# Generated by uhdcpc for eth2

```

I think this openrc default behavior is really fucked up because the address it inserted doesn't match my network and the potential to wreck havoc.

Anyone know how to KILL OFF this behavior?

thanks.

----------

## khayyam

 *WWWW wrote:*   

> Anyone know how to KILL OFF this behavior?

 

WWWW ... yes, configure the interface in conf.d/net ... it is only the absence of anything defined for that interface that causes netifrc to look for a means to aquire an ip, gateway, resolution, etc.

That would be the most logical of behavior when calling init.d/net.{iface} ... it sets up the interface in accordance with what you provide, in the absence of anything provided it uses a dhcp client if it exists, ending with uhdcpc from busybox. I disagree with your evaluation of such a fallback as 'dumb', you are starting the network interface, getting an ip, etc, would be the expected outcome. If you don't want it configured *in some manner* then use 'config_eth0="null"', or add USE="savedconfig" to busybox and disable uhdcpc from your busybox binary.

best ... khay

----------

## krinn

 *WWWW wrote:*   

> There's some fault in the openrc logic that a user wants and needs dhcpcd BY ALL MEANS regardless of personal preference. A little bit like systemd.
> 
> 

 

I agree with khayyam, if you don't configure it to not use it, you didn't emit any personal preference.

default seems fine: if user is dumb, lost or misconfigure try configure it for him with dhcp, if user tells us not to we obey his choice.

----------

## UberLord

 *WWWW wrote:*   

> I think this openrc default behavior is really fucked up because the address it inserted doesn't match my network and the potential to wreck havoc.

 

If a DHCP client puts an address into resolv.conf that doesn't match your network, I would be more concerned about a rogue DHCP server on your network at this point.

----------

## NeddySeagoon

WWWW,

I guess you have a link-local address?

That's the range 169.254.1.0 through 169.254.254.255.

----------

