# [solved]/etc/init.d/net.eth0 runs twice

## dgulotta

I upgraded to baselayout-2 recently and now net.eth0 tries to start twice every time I boot.  This is especially annoying because the second one can't be cancelled with ctrl-c.  How do I prevent this from happening?

The relevant part of the console output looks like this:

```

* Bringing up interface eth0

*   Running preup ...

*   dhcp ...

*     Running dhcpcp ...

eth0: dhcpcd 4.0.15 starting

eth0: waiting for carrier

^Ceth0: recevied SIGINT, stopping

*  * rc: caught SIGINT, abortingnet.eth0: caught SIGINT, aborting

INIT: entering runlevel: 3

* Bringing up interface eth0

*   Running preup ...

*   dhcp ...

*     Running dhcpcp ...

eth0: dhcpcd 4.0.15 starting

eth0: waiting for carrier

eth0: timed out

* ERROR: net.eth0 failed to start

```

Last edited by dgulotta on Mon Aug 23, 2010 10:47 pm; edited 1 time in total

----------

## Sadako

It looks as if net.eth0 is in both your boot and your default runlevels, I just tested here, and I can add net.eth0 to boot runlevel even when it's already in default without complaint, so IMHO it's an openrc bug...

Run `rc-update` to see, and if that's the case remove it from one of them, preferably boot.

----------

## dgulotta

Here is my rc-update - net.eth0 isn't listed at all.

```

            savecache |         shutdown                              

             bootmisc |                                 boot          

          consolefont |                                 boot          

            killprocs |         shutdown                              

            alsasound | default                                       

                devfs |                         sysinit               

                dmesg |                         sysinit               

                 swap |                                 boot          

       udev-postmount | default                                       

         cpufrequtils | default                                       

           localmount |                                 boot          

               procfs |                                 boot          

                 mtab |                                 boot          

              keymaps |                                 boot          

                 root |                                 boot          

              hwclock |                                 boot          

                 udev |                         sysinit               

               net.lo |                                 boot          

                  xdm | default                                       

              urandom |                                 boot          

             hostname |                                 boot          

              modules |                                 boot          

                 fsck |                                 boot          

         termencoding |                                 boot          

               sysctl |                                 boot          

                local | default                              nonetwork

             netmount | default                                       

             mount-ro |         shutdown                              

```

Also, the first attempt at starting net.eth0 always fails for some reason.

----------

## Amity88

don't you use the eth0 interface? Just asking because it times out while waiting for the carrier. I never had multiple eth0 startups, but it starts even when I remove it from all run levels, something to do with evdev I think.

I don't use the eth0, so I installed netplug to prevent it from wasting time at startup.

----------

## krinn

 */etc/conf.d/rc wrote:*   

> # 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
> ...

 

More what you are looking for, i suppose you just don't use net.eth0 but have the interface in your computer

----------

## gerard27

/etc/init.d/net-eth0 is just a symlink to /etc/init.d/net.lo.

What do you have in /etc/conf.d/net?

Gerard.

----------

## bus_drivr

See krim's post it can start from rc.conf and from /boot/runlevels/* which  is your issue I think

----------

## dgulotta

netplug seems to do what I wanted.  Thanks!

----------

