# Do not start net.eth0 and dhcp at the boot time

## LaoLiulaoliu

I want to stop the net.eth0's start at the boot time.So I use rc-update -d net-eth0.But when booting,the net.eth0 still be started,then run dhcpcd.I just want to start it by hand later,and speed up the boot time(the dhcp cost a lot of time).

I see the follow line added net.eth0.

Device initiated services: net.eth0 udev-postmount

----------

## bobber205

```

emerge -va net-plug

```

Problem solved.  :Smile: 

----------

## LaoLiulaoliu

emerge -p net-plug

These are the packages that would be merged, in order:

Calculating dependencies |

emerge: there are no ebuilds to satisfy "net-plug".

----------

## bobber205

Take out the -.

----------

## username234

or you can edit /etc/conf.d/rc

find the line RC_PLUG_SERVICES="" and change it to

RC_PLUG_SERVICES="!net.*"

this will keep eth0 from coming up and asking for an address, yet still be configurable from the command line later on.  if you later decided to have eth0 come up during boot you can either remove the !net.* or run rc-update add net.eth0 <runlevel> then eth0 would come up as expected.  I'm doing this on mine because I have a wifi card and so the ethernet is rarely hooked up.

----------

## LaoLiulaoliu

 *username234 wrote:*   

> or you can edit /etc/conf.d/rc
> 
> RC_PLUG_SERVICES="!net.*"

 

I am sorry,your method seems useless to me.

----------

## bobber205

Lol. That prevents udev from starting and stopping your net interfaces so it's not.

----------

## LaoLiulaoliu

1.rc-update add udev-postmount default

2.rc-update del net.eth0 

But the net.eth0 still run at the boot time.

----------

## Ehnvis

As bobber205 already have recommended emerge netplug and the problem will go away.

----------

## LaoLiulaoliu

 *Ehnvis wrote:*   

> As bobber205 already have recommended emerge netplug and the problem will go away.

 

But there are no ebuilds to satisfy "net-plug".

Have you ever see my post on the third floor.

----------

## Ehnvis

i said netplug not net-plug

----------

## bobber205

I said the same thing. Didn't you read my post?

----------

## LaoLiulaoliu

I am sorry.I take the "-" out,installed the netplug,but it is useless.After booting,I stilll have to stop the net.eth0 by hand.

----------

## Ehnvis

 *LaoLiulaoliu wrote:*   

> I am sorry.I take the "-" out,installed the netplug,but it is useless.After booting,I stilll have to stop the net.eth0 by hand.

 

Why stop it? It's in inactive state and thats what netplug is for, if you dont have a cable plugged in it will background net.eth0 at boot (and it wont slow down boot anymore) as soon as you plug a cable in it will notice that and start eth0 and run dhcpcd then.

But if you say it's useless I think you need to explain more on what your trying to do. I guess you dont want to have net.eth0 started at all at boot and only start it when you want to? Then use the solution username234 talked about and as soon as you want the network start it with /etv/init.d/net.eth0 start. You will only gain like a second at boot with that solution compared to netplug. On the other hand netplug wins imo as it monitors the interface and starts and stops it depending on cable or not.

Bobber205: I did read your posts, but it seemed like the one we'r trying to help didnt.

----------

## LaoLiulaoliu

Let me tell you something.

First,my English is not very well due to lack of practice.So I can not understand what you say very well.

Second,you are right.I don't want to have net.eth0 started at all at the boot time.Because after that,I have to /etc/init.d/net.eth0 stop and pppoe-start.

I don't quite know the network,but on my gentoo,the eth0 interface only can link to my University's local net.When I want to link to the Internet,I have to stop eth0 and use pppoe started.If I don't stop the eth0,the pppoe also can be started,but I can not link to anywhere.(When I use the pppoe way,it will cost me 0.5RMB/hour)

I think if the net.eth0 not auto start at the boot time can save a little time.And I will not bother me any more.

----------

