# Why does net.eth0 now always start [solved]

## TXTad

Howdy!

I have a laptop that is often run at several different locations, so I configured it to never start networking automatically since that was the most convenient thing. Now with recent changes, I suppose to baselayout, net.eth0 always wants to start, even though it's not included in the boot or default run level. How to I configured eth0 to not try to start automatically, yet have a DHCP configuration when I run "/etc/init.d/net.eth0 start"?

Thanks,

TadLast edited by TXTad on Tue Sep 26, 2006 7:22 pm; edited 1 time in total

----------

## coplaniuk

I had a similar problem.  It turned out that net.eth0 (or, in my case, net.eth1) was starting because apache required net to start prior to it running.  Take a look at your automatic startup scripts (run 'rc-update -s') to see what's running by default or at boot.  My guess is that you're running apache by default.

If, per chance, I'm correct...you can edit the /etc/conf.d/apache (or whatever script you're running) to disable that line.  Check the 'depend' section that will look very much like this:

```

depend() {

     need net # commented out for networkless use

     use mysql dns logger netmount postgresql

     after sshd

}
```

The line that reads 'need net' can be disabled by adding a '#' in front to look like this:

```

depend() {

     # need net # commented out for networkless use

     use mysql dns logger netmount postgresql

     after sshd

} 
```

Note...if there are other things on that 'need' line...you may just want to move the 'net' variable to the end of that line and comment it out.  Of couse...make sure you don't absolutely need that in order for the application to run.

In my case, I was running apache so that I could do some local development in PHP.  Your situation may be very similar.  apache doesn't reallly need otuside connection...and since you're running net.lo, you should be fine.

If in doubt, post the output of 'rc-update -s' and I'll try to help you some more.

----------

## TXTad

rc-update -s doesn't mention net.eth0. This occured after the latest updates I installed.

----------

## .:chrome:.

some of your active service requires net

post an rc-update show

----------

## UberLord

Or look into installing a wired interface manager, like netplug

----------

## TXTad

Output as requested:

```
# rc-update show

 * Invalid runlevel entry: /etc/runlevels/boot/.keep

 * Invalid runlevel entry: /etc/runlevels/default/.keep

 * Invalid runlevel entry: /etc/runlevels/nonetwork/.keep

 * Invalid runlevel entry: /etc/runlevels/single/.keep

               acpid |      default

           alsasound |      default

            bootmisc | boot

             checkfs | boot

           checkroot | boot

               clock | boot

               cupsd |      default

                famd |      default

                 gpm |      default

            hostname | boot

            iptables |      default

             keymaps | boot

               local |      default nonetwork

          localmount | boot

             modules | boot

              net.lo | boot

                ntpd |      default

             portmap |      default

           rmnologin | boot

              serial | boot

                sshd |      default

           syslog-ng |      default

             urandom | boot

          vixie-cron |      default

              xinetd |      default

```

----------

## TXTad

Bump.

I have noticed that I have the output "device initiated services" now referring to eth0 appearing.

Tad

----------

## xglad

Take a peek at the documentation for RC_HOTPLUG and RC_COLDPLUG in /etc/conf.d/rc.

----------

## TXTad

That was it. Setting RC_COLDPLUG="no" made it behave as it should.

Tad

----------

## coplaniuk

As a followup to this...you can still enable coldplug and prevent some things from being coldplugged.  In my case, I don't want net.eth0 to autostart since I don't use it by default.  So I edited my /etc/conf.d/rc to resemble the following:

```

RC_COLDPLUG="yes"

RC_PLUG_SERVICES="!net.eth0"  

# for non-coders, the '!' means (in this case) 'do not plug net.eth0

```

----------

## TXTad

How can one get a list of all the cold plugged services on a machine?

Tad

----------

## UberLord

baselayout-1.12

ls /var/lib/init.d/coldplugged

baselayout-1.13

ls /lib/rcscripts/init.d/coldplugged

----------

## kamracik

as this topic is similar to my question i ask here :]

recently i have add a wifi card to my notebook and have the same issue, i get device initiated and its automaticlly start :/ i know how to obey this by conf rc but i ask why is that problem?? i have 6 net interfaces and only that one starts in that way.. why??

----------

