Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Cannot disable dhcpd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
GOS
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 93
Location: Germany

PostPosted: Sat Mar 15, 2014 8:47 pm    Post subject: [solved] Cannot disable dhcpd Reply with quote

Hello,

strange thing. I removed dhcpd from all runlevels but dhcpd starts and overwrites my static configuration in "/etc/conf.d/net"

Code:
# rc-update -v show | grep dhcpcd
               dhcpcd |     


Any ideas why dhcpd is starting? I use OpenRC.

Best regards
GOS


Last edited by GOS on Sat Mar 15, 2014 9:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
GOS
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 93
Location: Germany

PostPosted: Sat Mar 15, 2014 9:12 pm    Post subject: Reply with quote

Strange thing; I made a world update --> Now it is working 8O
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sat Mar 15, 2014 11:12 pm    Post subject: Reply with quote

GOS ... its probably as something 'need[s] net' (which dhcpcd provides) ... if you (or anyone searching the forums) run into this issue again you can add the following to /etc/rc.conf ...

Code:
rc_dhcpcd_provide="!net"

best ... khay
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sun Mar 16, 2014 1:24 am    Post subject: Reply with quote

khayyam wrote:
GOS ... its probably as something 'need[s] net' (which dhcpcd provides) ... if you (or anyone searching the forums) run into this issue again you can add the following to /etc/rc.conf ...
Code:
rc_dhcpcd_provide="!net"

Hey khay,

That's curious, though I guess logical. I thought eth0 etc provided net though, so if your network card isn't working, what good is it to start dhcpcd?

I can understand needing your dhcpcd up before you can do other network things, it just seems a bit odd. If eth0 is also going to provide it, then surely that means it's going to be considered fulfilled before dhcpcd is up? Or does it merge them into one thing, where all are required for the provides to be fulfilled?

It seems to me that it'd be better to have another layer on top of net, called network, to allow plumbing etc to be setup after network connections, and before servers requiring IP addresses. (Or change net to phy.)

Sorry if I'm missing something obvious, or that's changed recently.

Regards,
igli.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Mar 16, 2014 1:58 pm    Post subject: Reply with quote

steveL wrote:
khayyam wrote:
Code:
rc_dhcpcd_provide="!net"

That's curious, though I guess logical. I thought eth0 etc provided net though, so if your network card isn't working, what good is it to start dhcpcd?

hey steve/igli ... I'm having to clear out some cobwebs on this one as my memory is a little vague as to when and why this change came about. Anyhow, I believe it was contiguous with the openrc/netifrc split.

As '/etc/init.d/net.ethX' may not exist, if anything 'need[s] net' then dhcpcd is the default provider (as it will automatically detect and manage interfaces). net.eth0 can't 'provide net' as its only there if and when the user makes the symlink, whereas the dhcpcd service is there given the user has installed the package.

steveL wrote:
I can understand needing your dhcpcd up before you can do other network things, it just seems a bit odd. If eth0 is also going to provide it, then surely that means it's going to be considered fulfilled before dhcpcd is up? Or does it merge them into one thing, where all are required for the provides to be fulfilled?

Well, there is "eth0" (or enfoo1xyz or what-have-you) the interface, and then the service (with its provisions and dependencies in terms of openrc's initialisation). The "service" is covered by anything providing "net" which just needs to be met if something "need[s] net" ... so, its just a fallback to have dhcpcd (if its installed) be the default provider. Remember, net.ethX calls dhcp (one or other client) it doesn't start the service, the reverse it true for providing 'net', a service has to provide this, and as net.ethX is user created this may not exist ... hence dhcpcd being the default. With the above 'rc_dhcpcd_provide="!net"' dhcpcd is disabled as a provider which would then allow some other provider preference (ie, net.eth0 if it exists).

steveL wrote:
It seems to me that it'd be better to have another layer on top of net, called network, to allow plumbing etc to be setup after network connections, and before servers requiring IP addresses. (Or change net to phy.)

Not sure I understand ... there are a number of "layers" provided by openrc: before, after, depend, provide, need, use, etc ... in the case of 'net' and its being provided by dhcpcd, its just a fallback should nothing else be available and though I'm a little unimpressed by this kind of automagic (it should probably just fail imo) it seems like it was introduced to cover situations where 'net.xxxxx' may be (un-)predictable :)

best ... khay
Back to top
View user's profile Send private message
GOS
Tux's lil' helper
Tux's lil' helper


Joined: 09 Sep 2010
Posts: 93
Location: Germany

PostPosted: Sun Mar 16, 2014 2:29 pm    Post subject: Reply with quote

I think it means that in my case /etc/init.d/net.xyz was not startet with the configuration in /etc/conf.d/net before the world update. Probably the world update fixed this problem and therefore dhcpd wasn't used again.

Thanks for explanations.
GOS
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Mar 17, 2014 5:27 am    Post subject: Reply with quote

khayyam wrote:
As '/etc/init.d/net.ethX' may not exist, if anything 'need[s] net' then dhcpcd is the default provider (as it will automatically detect and manage interfaces). net.eth0 can't 'provide net' as its only there if and when the user makes the symlink, whereas the dhcpcd service is there given the user has installed the package.

Hmm automatically detect and manage interfaces sounds nice, and rings a bell. I think this is the gentoo-net ("old-net") thing in action then, and the idea was for it to be dropped and people move to dhcpcd, which was also Roy Marple's plan ("uberLord" iirc.)

The !foo makes sense, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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