Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why /etc/init.d/dhcpcd does "provides net"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bzaborow
n00b
n00b


Joined: 21 Dec 2013
Posts: 2

PostPosted: Sat Dec 21, 2013 2:58 pm    Post subject: Why /etc/init.d/dhcpcd does "provides net" Reply with quote

Hi all,

I've just wasted few hours figuring why dhcpcd starts in my system when I intentionally disabled starting at boot time any of the net interfaces.
Finally I found that for some reason dhcpcd service claims it "provides net". Since it was the only not disabled service providing net at my box it was started in "needed" runlevel (as a dependency for netmount, which was at default runlevel by a mistake :wink:). The problem was that during boot it every time brought up all interfaces and hung the boot process for ~20 seconds waiting for responses before it went background.

Nevermind, now I wonder why dhcpcd is supposed to provide net? In my case it not only does not provide any network connection, but also is useless, since I want to setup the connection manually, for example using modem with wvdial (it discovers IP address somehow itself). And other ifaces, like net.wlan0 handled by wpa_supplicant or net.eth0 run their own instance of dhcp when I start them manually. Maybe the dhcpcd service should be just "before net"?



PS. I'm new at the forum, so I'm sorry if I opened the thread in wrong place or something.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42563
Location: 56N 3W

PostPosted: Sat Dec 21, 2013 3:25 pm    Post subject: Reply with quote

bzaborow,

I noticed you were new, welcome to Gentoo.

dhcpcd is not installed unless you ask for it. It should only be in the default runlevel it you will use it on all of your interfaces.
It will be called as required if you only need it on some interfaces.

A modem and wvdial will set up a ppp link. The host at the other end of the link will tell your PC how to set up the interface ppp0.

You may want to edit /etc/rc.conf ... the comments will help
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bzaborow
n00b
n00b


Joined: 21 Dec 2013
Posts: 2

PostPosted: Sat Dec 21, 2013 3:46 pm    Post subject: Reply with quote

NeddySeagoon wrote:
bzaborow,

I noticed you were new, welcome to Gentoo.

dhcpcd is not installed unless you ask for it. It should only be in the default runlevel it you will use it on all of your interfaces.
It will be called as required if you only need it on some interfaces.

A modem and wvdial will set up a ppp link. The host at the other end of the link will tell your PC how to set up the interface ppp0.

You may want to edit /etc/rc.conf ... the comments will help


Im not new to Gentoo, just never posted to gentoo forums;)

The dhcpcd is not in default runlevel, it never was on this machine. It was started as a dependency by netmount, as I stated before. In particular, I've already played with /etc/rc.conf to disable autostarting of net.eth0 and net.wlan0.

The dhcpcd autostarting was not really my question, just a background and the problem is now solved. Maybe I didn't emphasize my question enough: I would like to understand how openrc works in gentoo better and this behaviour (dhcpcd providing net) seems strange to me. Maybe I don't understand the meaning of "net" or something - thats why I ask.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Sat Dec 21, 2013 4:23 pm    Post subject: Reply with quote

"net" is not defined, as it might refer to usable connection (NetworkManager's way), configured network interface (netifRC way) or even local loopback (very old openrc way)

Dhcpcd used to be only a module used for autoconfiguration, it seems it was turned into a service itself when openrc split into openrc and netifrc, so dhcpcd is self-sufficient now. I'm not dev, it' my guess about reasons.

So, basicaly if want to use dhcpcd the old way, only as a module rather than net service (leaving this job to netifrc), `echo rc_provide="!net" >> /etc/conf.d/dhcpcd` or `echo rc_provide="!*" >> /etc/conf.d/dhcpcd` should restore old behaviour - netifrc will bring interfaces up and call dhcpcd to assign address
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum