# [SOLVED] net.eth0 launching itself during boot

## arcfxn

The short description is as follows:

net.eth0 isn't specified in any runlevel, but it starts during boot anyway. I have my own script to connect via wlan0 after boot, as there is no wired connection. This is a major problem for me, because net.eth0 hangs for a while after starting dhcpcd, and I have to wait for it to give up.

I can't make sense of why this is happening, but I did notice that there is a message during boot that refers to net.eth0 as a "device initiated service." I'm not sure what that means. Hope you guys can shed some light here, thanks in advance.

```
rc-update -s

           alsasound | boot                          

            bootmisc | boot                          

             checkfs | boot                          

           checkroot | boot                          

               clock | boot                          

         consolefont | boot                          

               cupsd |      default                  

                dbus |      default                  

               dcron |      default                  

                 gpm |      default                  

                hald |      default                  

            hostname | boot                          

             keymaps | boot                          

               local |      default nonetwork        

          localmount | boot                          

             modules | boot                          

              net.lo | boot                          

           rmnologin | boot                          

           syslog-ng |      default                  

      udev-postmount |      default                  

             urandom | boot                          

                 xdm |      default
```

Last edited by arcfxn on Sat Apr 16, 2011 2:30 am; edited 1 time in total

----------

## Adwin

Try blacklisting it in udev rules.

Once udev kicks in, it basically pulls the interface up, and net.lo (net.eth* is only a symlink) takes care of the rest.

----------

## cach0rr0

delete the net.eth0 init script

not joking

----------

## chithanh

If you use baselayout-1, blacklist net.eth0 in rc configuration

```
RC_PLUG_SERVICES="!net.eth0"
```

Alternatively you can make net.eth0 fail immediately in preup() if no cable is connected. See net.example for instructions.

----------

## arcfxn

 *Adwin wrote:*   

> Try blacklisting it in udev rules.
> 
> Once udev kicks in, it basically pulls the interface up, and net.lo (net.eth* is only a symlink) takes care of the rest.

 

I think I'll try that, but I'm not really sure how udev works.

 *cach0rr0 wrote:*   

> delete the net.eth0 init script
> 
> not joking

 

I'd be really scared to do that.

 *chithanh wrote:*   

> If you use baselayout-1, blacklist net.eth0 in rc configuration
> 
> ```
> RC_PLUG_SERVICES="!net.eth0"
> ```
> ...

 

Making it fail immediately w/o a cable sounds like a nice way to do things, but idk how easy that would be. I'll check it out I guess.

----------

## arcfxn

It almost seems like you guys are competing with these solutions. I'm not really sure which to employ.

----------

## cach0rr0

 *arcfxn wrote:*   

> 
> 
> I'd be really scared to do that.
> 
> 

 

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

if later on you decide you want a net.eth0 init script:

```

cd /etc/init.d/

ln -s net.lo net.eth0

```

 *arcfxn wrote:*   

> 
> 
> It almost seems like you guys are competing with these solutions. I'm not really sure which to employ.
> 
> 

 

any of these solutions should work, depending on your setup. None of the suggested solutions have any real risk. 

You can also look in /etc/conf.d/rc (for baselayout-2 - his suggestion was for baselayout-1), and play with:

```

RC_NET_STRICT_CHECKING="lo"

```

See the comments in that file to see what each does, but I would change it from 'no' to 'lo' in your case. 

If all of the "cleaner" methods do not help, you always have the option of deleting /etc/init.d/net.eth0

----------

## arcfxn

Thanks, I've tried removing the symlink. I'll let you know if it worked next time I reboot.

----------

## arcfxn

That did it, and boot time has decreased dramatically. Thanks a million cach0rr0 et al.

Changing topic to solved.

I'm wondering though, why was this necessary / why was it happening in the first place?Last edited by arcfxn on Tue Apr 19, 2011 2:59 am; edited 1 time in total

----------

## cach0rr0

 *arcfxn wrote:*   

> 
> 
> I'm wondering though, why was this necessary / why was it happening in the first place?

 

not completely awake so i have to give a short/abbreviated answer

from what i remember, it had something to do with services that had "need net" defined in their init scripts; for some reason the system seemed to think that net.lo was insufficient to provide net. Basically net.eth0 was seen as a dependency for providing the net service, so it got started up. I don't know if this is because everything in init.d that had "provide net" gets auto-started, or which, but it's the same sort of deal as when you have a service that has e.g. "need nfs", when you start that service, it'll start the nfsmount service (or, whatever does "provide nfs"). 

Someone else can probably explain it more correctly or accurately, but it's along those lines.

----------

