View previous topic :: View next topic |
Author |
Message |
Manu311 Tux's lil' helper
Joined: 17 Nov 2010 Posts: 128
|
Posted: Fri Jun 03, 2011 4:56 pm Post subject: [SOLVED] Don't start dhcp at bootup |
|
|
Hi,
I've set up my laptop with gentoo, installed everything needed and I want to configure my network with wicd, wicd depends on dhcpcd, so I had to install that.
But now everytime I start my system, it initiates dhcpcd (which isn't in any runlevel). This also happens when I (re)start sshd. When I unemerge dhcpcd everything is working as I want it - no error nothing.
But I'll need a dhcp client in the future, so that's no alternativ (it will be reinstalled everytime I emerge update anyways).
So I've been searching for days now where this is configured to do so.
The only clue so far was /etc/conf.d/net which was entirely empty but the comments in it tells me that will cause it to run dhcp on any device, so I changed added: eth0_config=( "null" ) - which didn'T worked, I changed the null to an ip, which still didn't work.
I'm sure there must be a hint somewhere, but I just can't find it.
Thanks for any help.
Last edited by Manu311 on Fri Jun 03, 2011 7:24 pm; edited 1 time in total |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
|
Back to top |
|
|
rh1 Guru
Joined: 10 Apr 2010 Posts: 501
|
Posted: Fri Jun 03, 2011 5:51 pm Post subject: |
|
|
Whether the OP is using wicd or networkmanager has nothing to do with dhcpcd starting. I think it has to do with the init script but can't check right now |
|
Back to top |
|
|
Manu311 Tux's lil' helper
Joined: 17 Nov 2010 Posts: 128
|
Posted: Fri Jun 03, 2011 5:53 pm Post subject: |
|
|
And what if I'm engaged with wicd?
Anyways it's not gonna help, I'll still need a dhcp client and it looks like networkmanager also depends on dhcpcd, so it's the same thing.
The problem appears also if I don't start wicd or even remove it entirely.
wicd itself works as expected (so far). |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Fri Jun 03, 2011 5:57 pm Post subject: Re: Don't start dhcp at bootup |
|
|
Manu311 wrote: | Hi,
I've set up my laptop with gentoo, installed everything needed and I want to configure my network with wicd, wicd depends on dhcpcd, so I had to install that.
But now everytime I start my system, it initiates dhcpcd (which isn't in any runlevel). This also happens when I (re)start sshd. When I unemerge dhcpcd everything is working as I want it - no error nothing.
But I'll need a dhcp client in the future, so that's no alternativ (it will be reinstalled everytime I emerge update anyways).
So I've been searching for days now where this is configured to do so.
The only clue so far was /etc/conf.d/net which was entirely empty but the comments in it tells me that will cause it to run dhcp on any device, so I changed added: eth0_config=( "null" ) - which didn'T worked, I changed the null to an ip, which still didn't work.
I'm sure there must be a hint somewhere, but I just can't find it.
Thanks for any help. |
I believe that if the interface requires dhcp (empty config in /etc/conf.d/net will do for that), the dhcpcd will be run when interface is brought up. So you should be looking into different question - how not to bring up interfaces on boot.
For example, by using ifplugd, or not having network /etc/init.d/net.... in the boot sequence and lauching them later separtely. I don't know how wicd works though |
|
Back to top |
|
|
Manu311 Tux's lil' helper
Joined: 17 Nov 2010 Posts: 128
|
Posted: Fri Jun 03, 2011 6:08 pm Post subject: Re: Don't start dhcp at bootup |
|
|
dmpogo wrote: | how not to bring up interfaces on boot.
For example, by using ifplugd, or not having network /etc/init.d/net.... in the boot sequence and lauching them later separtely. I don't know how wicd works though |
There is no /etc/init.d/net.... file which is in any runlevel
Anyways it's not just at boot, it also starts anytime I start sshd.
If I /etc/init.d/dhcpcd stop that will also stop sshd, and if I restart sshd that will start dhcpcd again - the only way, I found so far, is to remove dhcpcd entirely, and I don't want to do that (since neither networkmanager nor wicd work and ofc dhcp doesn't no matter how I try it).
Oh and my wired connection will most likely never need dhcp, and my wireless not often (currently I haven't installed wireless at all), so it doesn't NEED dhcp, so why should I waste my resources on dhcp when I simply don't need it? I'm not at windows after all. |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Fri Jun 03, 2011 6:44 pm Post subject: |
|
|
1) I mean /etc/init.d/net.eth0 or /etc/init.d/wlan0
you don't have those ?
2) Are you saying you have dhcpcd in the default/boot runlevel ?
You should not, do rc-update del dhcpcd default
3) sshd requires 'net' . 'net' can be provided by many packages, dhcpcd provides net, net.eth0 provides net.
If you stop the last service that provides net, it has to take down sshd as well.
4) how is your wired connection configured ? |
|
Back to top |
|
|
Manu311 Tux's lil' helper
Joined: 17 Nov 2010 Posts: 128
|
Posted: Fri Jun 03, 2011 7:24 pm Post subject: |
|
|
dmpogo wrote: | 1) I mean /etc/init.d/net.eth0 or /etc/init.d/wlan0
you don't have those ?
2) Are you saying you have dhcpcd in the default/boot runlevel ?
You should not, do rc-update del dhcpcd default
3) sshd requires 'net' . 'net' can be provided by many packages, dhcpcd provides net, net.eth0 provides net.
If you stop the last service that provides net, it has to take down sshd as well.
4) how is your wired connection configured ? |
Thanks a lot, I still have no clue what exactly "net" is, but after I readded net.eth0 to a runlevel dhcpcd stopped beeing autostarted.
That fixed it, thank you. |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Fri Jun 03, 2011 7:58 pm Post subject: |
|
|
Manu311 wrote: |
Thanks a lot, I still have no clue what exactly "net" is, but after I readded net.eth0 to a runlevel dhcpcd stopped beeing autostarted.
That fixed it, thank you. |
gentoo init scripts have a system of dependencies between scripts which are set by using 'need something' 'use something' 'provide something' directives.
Look inside /etc/init.d/sshd and see that it has 'need net' statement.
That means that sshd can start only after some other service which has 'provide net' started before. Thus starting sshd will start some service which
'provides net' among the configured ones if none are running already. Similarly shutting down the last service that 'provide net' will shutdown all services that 'need net', since, supposedly, they can't run without.
It is semi-manual way to set up dependencies, but it works.
'net' here is just a keyword.
Usually 'net' is provided by one of the interface scripts /etc/init.d/net.eth0 which are usually in default level and are started. In your case, the only script that had 'provide net' in it was dhcpcd. so it had to carry this responsibility.
'use something' is weaker than 'need'. It says that the script can use something, but can run without it as well. |
|
Back to top |
|
|
|
|
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
|
|