LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   system tries to connect eth0 during init (https://www.linuxquestions.org/questions/gentoo-87/system-tries-to-connect-eth0-during-init-846350/)

wetweasel 11-24-2010 02:49 PM

system tries to connect eth0 during init
 
everytime I boot up I have to wait until the dhcp request sent on eth0 times out - where is this configured, how can i tell gentoo not to try connecting via eth0 as part of init?

Drakeo 11-24-2010 04:41 PM

/etc/rc.d/rc.inet1.conf hope that helps. or
Quote:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes" change to ""
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

markush 11-24-2010 05:22 PM

Quote:

Originally Posted by Drakeo (Post 4170038)
/etc/rc.d/rc.inet1.conf hope that helps. or

No, this will not work since Gentoo does not have a /etc/rc.d directory and no rc.inet1.conf file.

I've emerged ifplugd, this works for me (at least with Gentoo). I use this on my laptop since I normally use a wireless network and no cable is connected.
If you need to connect your computer in different networks, I'd recommend to look at netcfg, this allows for profiles for different networks. There are many excellent articles in the Gentoowiki.

Markus

i92guboj 11-25-2010 02:11 AM

The network configuration is done via /etc/conf.d/net, that's the place to look at. You will probably have a line for that interface (eth0) describing how to get an ip, which is via dhcp in this case.

You can do many things, but I'd suggest either to give it a fixed ip OR just do this and remove eth0 from all the runlevels:

Code:

rc-update del net.eth0
Which is even easier.

If you then need to start that nic you just need to do this:

Code:

/etc/init.d/net.eth0 start
And to stop it:

Code:

/etc/init.d/net.eth0 stop
Simple enough.

wetweasel 11-25-2010 02:40 AM

i92guboj:
Code:

andromeda ~ # rc-update del net.eth0
 * 'net.eth0' not found in any of the specified runlevels

markush: emerging ifplugd did indeed work, but I'm not really satisified by magical fixes, so I'd still like to know why net.eth0 was being init'ed despite not showing up under rc-update show

thanks for your time guys

i92guboj 11-25-2010 03:15 AM

Do you have something in your /etc/conf.d/local* script(s)?

In any case, what version of baselayout are you using?

comprookie2000 11-25-2010 05:06 AM

In addition to removing it from the default runlevel, if you are on a stable system check out /etc/conf.d/rc;
Code:

RC_PLUG_SERVICES="!net.eth0"
if you are running ~arch then check out /etc/rc.conf
Code:

rc_hotplug="!net.eth0"

wetweasel 11-25-2010 03:41 PM

Quote:

Originally Posted by i92guboj (Post 4170491)
Do you have something in your /etc/conf.d/local* script(s)?

In any case, what version of baselayout are you using?

those scripts are empty, save for a few stock comments.

baselayout version.. how can I check? the default one, baselayout-1 I guess?

andrewthomas 11-25-2010 05:17 PM

Quote:

Originally Posted by wetweasel (Post 4171147)
those scripts are empty, save for a few stock comments.

baselayout version.. how can I check? the default one, baselayout-1 I guess?

If you have emerged gentoolkit, then here is how you check the version of a package
Code:

andrew@asus ~ $ equery list baselayout
 * Searching for baselayout ...
[IP-] [  ] sys-apps/baselayout-2.0.1-r1:0

Furthermore,
Code:

rc-update show
will show you what services start at what runlevels

wetweasel 11-26-2010 08:56 AM

equery list baselayout
Code:

[ Searching for package 'baselayout' in all categories among: ]
 * installed packages
[I--] [  ] sys-apps/baselayout-1.12.13 (0)

i am marking this as solved, as the problem has indeed been solved - the rest is just curiosity


All times are GMT -5. The time now is 03:33 AM.