# net.eth0 starts at boot [SOLVED]

## Efo

Hi guys,

Since I updated my box, net.eth0 starts at boot. 

I dont want it to start at boot because if I am not connectet through my ethernet card the system takes forever to boot looking for a connection on net.eth0.

I used to have it in m rc-update but now it doesnt show there and I dont know where to look for it.

Any idea?

Thanks

EfoLast edited by Efo on Thu Oct 05, 2006 3:49 pm; edited 1 time in total

----------

## babudro

I don't know why it auto-starts all the Ethernet ports, but I got past it quickly by just setting an unused bogus address (in /etc/conf.d/net) for the ports I don't want to start automatically.

Something like:  config_eth0=("192.168.255.1/32")

It's not the best solution, but if you're short on time and need a quick fix it gets the job done.

----------

## Suer7reus

If you've already used

```
rc-update del net.eth0 default
```

and it still starts, it's likely being caused to start by some service that depends on it for whatever reason.  You may be able to disable this sort of behavior in /etc/conf.d/rc, particularly the "strict net checking" and hotplug-related options.

Those may be a good idea, but there are several alternatives you should consider first as it will be inconvenient (just a little bit) to have to start net.eth0 manually.

First, consider installing sys-apps/ifplugd or sys-apps/netplugd, which add cable-detection functionality to Gentoo's net init-scripts.  Basically, your system would only sit and wait for dhcp to do it's thing if it detected a network cable plugged-in.  Also, upon insertion of a cable, your system would automatically bring the interface up in the background.  What's more, those should activate automatically upon installation on the newer baselayout versions.  If you do this, you ought to re-add net.eth0 to your default runlevel since it won't cause a delay any longer.

Second, consider lowering your DHCP request timeout.  dhcpcd (the default DHCP client) defaults to wait one minute before giving up when no response is received.  If you're using dhcpcd (probably), the command-line argument is -t #, where # is a number of seconds.  20 should be plenty, IMO.  You can make the necessary configuration change in /etc/conf.d/net, adding

```
dhcpcd_eth0="-t 20"
```

if you have a newer baselayout.

If in doubt, you can read /etc/conf.d/net.example.

----------

## Efo

Thank you guys for the tricks, but before I use any of them I would really like to know what is starting my eth0.

I checked my rc file and I have:

RC_NET_STRICT_CHECKING="no" (also tried with none)

RC_HOTPLUG="no"

I think this happened around the time ppp got updated... mhhh... any other idea on how I can find what is starting it?

Here is my  rc-update show

           alsasound |      default

            bootmisc | boot

             checkfs | boot

           checkroot | boot

               clock | boot

            coldplug | boot

         consolefont | boot

               cupsd |      default

            hostname | boot

                 hsf |      default

             keymaps | boot

               local |      default

          localmount | boot

             modules | boot

              net.lo | boot

            netmount |      default

           rmnologin | boot

             urandom | boot

              xinetd | boot

----------

## Aurisor

I personally would go with Suer7reus's suggestions....you have a network card in your computer....why simply disable it when you can just have it ready to go at a moment's notice?

Of course, though, I totally respect your desire to get to the root of the problem first.

You can try this for starters (you may have to be root):

```

/etc/init.d/net.eth0 needsme

```

That will tell you if any of your services depend on having a net connection.

----------

## swimmer

Not that I understand too much about this issue but it seems to have to do with {hot,cold}plug ... this is what I put into my /etc/conf.d/rc: *Quote:*   

> # Some people want a finer grain over hotplug/coldplug. RC_PLUG_SERVICES is a
> 
> # list of services that are matched in order, either allowing or not. By
> 
> # default we allow services through as RC_COLDPLUG/RC_HOTPLUG has to be yes
> ...

 

and it prevents the net.* devices from starting up at boot.

HTH

swimmer

----------

## homry

 *Efo wrote:*   

> Hi guys,
> 
> Since I updated my box, net.eth0 starts at boot. 
> 
> I dont want it to start at boot because if I am not connectet through my ethernet card the system takes forever to boot looking for a connection on net.eth0.
> ...

 

same here. since my last update of dhcpcd and baselayout. also my wireless connection wont work anymore with wep encryp on.

homry

----------

## swimmer

Did you try what I suggested?

Greetz

swimmer

----------

## homry

not yet, but i will. although i would like to have net.eth1 to be started at boot.

homry

----------

## TheNewb

The advice worked totally for me!  Thanks.  

As near as I can tell, keeping net.eth1 started is as simple as using this instead:

```

RC_PLUG_SERVICES="net.eth1 !net.*" 

```

----------

## frodoontop

Otherwise you can try to delete /etc/init.d/net.eth0 if it is not used anyway. It's only a symlink to net.lo.

----------

## homry

but before the last update of baselayout it was pretty simple. i had links to net.lo (net.eth0 and net.eth1). i chose what i wanted to load at boot time by adding the desired init script to the default runlevel. this was easy. now both devices get started over net.lo (eth0 and eth1) at boot time (net.lo which is in the boot runlevel). basically, my known way of choosing the device which should be plugged at boot time changed from adding init scripts to runlevels to editing /etc/conf.d/rc ? 

homry

----------

## Efo

Hi guys!

Sorry it took so long, but I have been away for a month.

Anyway, the solution suggested by swimmer works! (RC_PLUG_SERVICES="!net.*")

Thanks everybody!

Efo

----------

