View previous topic :: View next topic |
Author |
Message |
bourane n00b
Joined: 25 Mar 2007 Posts: 30
|
Posted: Sun Oct 21, 2007 11:23 am Post subject: Eth0 always start but not in runlevel |
|
|
Hi
i have some troubles with gentoo on my laptop. so i have removed the eth0 link in default runlevel because i am not always connected. the problem is that the init script for eth0 start at every boot and i don't know why.
here my runlevels:
Code: | thor(11:58:43) /home/thomas # ll /etc/runlevels/*
/etc/runlevels/ac_adapter:
total 0
lrwxrwxrwx 1 root root 17 2007-08-06 21:40 acpid -> /etc/init.d/acpid
lrwxrwxrwx 1 root root 21 2007-08-06 21:40 alsasound -> /etc/init.d/alsasound
lrwxrwxrwx 1 root root 16 2007-09-30 21:45 hald -> /etc/init.d/hald
lrwxrwxrwx 1 root root 20 2007-09-16 21:10 iptables -> /etc/init.d/iptables
lrwxrwxrwx 1 root root 17 2007-08-06 21:40 local -> /etc/init.d/local
lrwxrwxrwx 1 root root 20 2007-08-06 21:25 net.eth0 -> /etc/init.d/net.eth0
lrwxrwxrwx 1 root root 20 2007-08-06 21:27 netmount -> /etc/init.d/netmount
lrwxrwxrwx 1 root root 16 2007-09-29 12:29 ntpd -> /etc/init.d/ntpd
lrwxrwxrwx 1 root root 19 2007-08-06 21:27 portmap -> /etc/init.d/portmap
lrwxrwxrwx 1 root root 15 2007-08-06 21:40 xdm -> /etc/init.d/xdm
/etc/runlevels/boot:
total 0
lrwxrwxrwx 1 root root 20 2007-07-05 17:29 bootmisc -> /etc/init.d/bootmisc
lrwxrwxrwx 1 root root 19 2007-07-05 17:29 checkfs -> /etc/init.d/checkfs
lrwxrwxrwx 1 root root 21 2007-07-05 17:29 checkroot -> /etc/init.d/checkroot
lrwxrwxrwx 1 root root 17 2007-07-05 17:29 clock -> /etc/init.d/clock
lrwxrwxrwx 1 root root 23 2007-07-05 17:29 consolefont -> /etc/init.d/consolefont
lrwxrwxrwx 1 root root 20 2007-07-05 17:29 hostname -> /etc/init.d/hostname
lrwxrwxrwx 1 root root 19 2007-07-05 17:29 keymaps -> /etc/init.d/keymaps
lrwxrwxrwx 1 root root 22 2007-07-05 17:29 localmount -> /etc/init.d/localmount
lrwxrwxrwx 1 root root 19 2007-08-01 19:21 metalog -> /etc/init.d/metalog
lrwxrwxrwx 1 root root 19 2007-07-05 17:29 modules -> /etc/init.d/modules
lrwxrwxrwx 1 root root 18 2007-07-05 17:29 net.lo -> /etc/init.d/net.lo
lrwxrwxrwx 1 root root 21 2007-07-05 17:29 rmnologin -> /etc/init.d/rmnologin
lrwxrwxrwx 1 root root 19 2007-07-05 17:29 urandom -> /etc/init.d/urandom
lrwxrwxrwx 1 root root 20 2007-10-14 12:24 watchdog -> /etc/init.d/watchdog
/etc/runlevels/default:
total 0
lrwxrwxrwx 1 root root 17 2007-07-16 00:10 acpid -> /etc/init.d/acpid
lrwxrwxrwx 1 root root 21 2007-08-06 21:12 alsasound -> /etc/init.d/alsasound
lrwxrwxrwx 1 root root 20 2007-09-16 21:10 iptables -> /etc/init.d/iptables
lrwxrwxrwx 1 root root 23 2007-08-07 19:35 laptop_mode -> /etc/init.d/laptop_mode
lrwxrwxrwx 1 root root 17 2007-07-05 17:29 local -> /etc/init.d/local
lrwxrwxrwx 1 root root 15 2007-07-07 15:28 xdm -> /etc/init.d/xdm
|
it seems to be that another script need eth0
eth0 start just after net.lo and before urandom
thanks |
|
Back to top |
|
|
Ehnvis Guru
Joined: 13 Jun 2006 Posts: 305 Location: /dev/random
|
Posted: Sun Oct 21, 2007 11:53 am Post subject: |
|
|
It's udev that starts eth0. If you want to use a nice solution emerge netplug, it will sense if you have a cable plugged in or not and start eth0 when you need it. _________________ HP NC 4010, Pentium-M 725 1.6GHz w/ 1Gb RAM, 60Gb Hitachi Travelstar.
Running Gentoo-2.6.21-r4 (again as 2.6.22 kernels hogs CPU), all but SD reader works fine. |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Sun Oct 21, 2007 11:54 am Post subject: |
|
|
Hi bourane,
It is started by net.lo.
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
bourane n00b
Joined: 25 Mar 2007 Posts: 30
|
Posted: Sun Oct 21, 2007 12:16 pm Post subject: |
|
|
Quote: | It is started by net.lo. |
i dont think so :
Code: | thor(13:10:39) /home/thomas # /etc/init.d/net.eth0 stop
* Service net.eth0 stopping
* Service net.eth0 stopped
thor(13:11:08) /home/thomas # /etc/init.d/net.lo restart
* Service net.lo stopping
* WARNING: you are stopping a boot service.
* Service net.lo stopped
* Service net.lo starting
* Service net.lo started
|
i will reboot to try netplug |
|
Back to top |
|
|
bourane n00b
Joined: 25 Mar 2007 Posts: 30
|
Posted: Sun Oct 21, 2007 12:30 pm Post subject: |
|
|
it's working : the system don't stay stuck 15seconds when the cable is not plugged :
after have started the laptop without the eth cable:
Code: | thor(13:21:56) /home/thomas # rc-status ac_adapter
Runlevel: ac_adapter
acpid [ started ]
alsasound [ started ]
hald [ stopped ]
iptables [ started ]
local [ started ]
net.eth0 [ inactive ]
netmount [ stopped ]
ntpd [ stopped ]
portmap [ stopped ]
xdm [ started ]
|
then i plug the cable:
Code: |
thor(13:22:06) /home/thomas # rc-status ac_adapter
Runlevel: ac_adapter
acpid [ started ]
alsasound [ started ]
hald [ stopped ]
iptables [ started ]
local [ started ]
net.eth0 [ started ]
netmount [ stopped ]
ntpd [ stopped ]
portmap [ stopped ]
xdm [ started ]
|
i am in default runlevel, i have shown the ac_adapter status to see the net.eth0 script.
Thanks a lot Ehnvis and Gerard van Vuuren ! |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sun Oct 21, 2007 11:27 pm Post subject: |
|
|
Can you post your /etc/conf.d/rc, because I had that problem with eth0 and I add this in this file :
Code: |
RC_PLUG_SERVICES="!net.*"
|
|
|
Back to top |
|
|
tylerwylie Guru
Joined: 19 Sep 2004 Posts: 458 Location: /US/Georgia/Atlanta
|
Posted: Mon Oct 22, 2007 2:12 am Post subject: |
|
|
Netmount all over again!
netplug ftw! |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Tue Oct 23, 2007 4:06 am Post subject: |
|
|
As d2_racing mentioned, it is started via the rc plug service, so it is unrelated to runlevels (unless you add it to some runlevel on purpose). What I suggest is to emerge netplug and let it background the connection until an ethernet cable is plugged into the machine. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Oct 23, 2007 12:03 pm Post subject: |
|
|
Or maybe ifplug ? |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Tue Oct 23, 2007 1:14 pm Post subject: |
|
|
d2_racing wrote: | Or maybe ifplug ? | ifplugd is older and, I think, not supported anymore. I've had better experiences with netplug. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Tue Oct 23, 2007 5:20 pm Post subject: |
|
|
Does netplug is simple as ifplugd, because I only emerge ifplugd and I didn't changed anything.
Everything runs out of the box. |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Tue Oct 23, 2007 5:39 pm Post subject: |
|
|
d2_racing wrote: | Does netplug is simple as ifplugd, because I only emerge ifplugd and I didn't changed anything.
Everything runs out of the box. | Yep, netplug is supported by the baselayout, so all you need to do is emerge it, and it will be automatically be backgrounded when net.eth* is started. You can have it work for other net.* devices as well.
I'm not sure what happens if you have both ifplud and netplug installed at the same time, but I would recommend using one or the other. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Oct 24, 2007 1:02 am Post subject: |
|
|
Ok, thanks |
|
Back to top |
|
|
96140 Retired Dev
Joined: 23 Jan 2005 Posts: 1324
|
Posted: Wed Oct 24, 2007 1:21 am Post subject: |
|
|
--
Last edited by 96140 on Fri Sep 13, 2013 8:57 am; edited 2 times in total |
|
Back to top |
|
|
Ehnvis Guru
Joined: 13 Jun 2006 Posts: 305 Location: /dev/random
|
Posted: Wed Oct 24, 2007 6:49 am Post subject: |
|
|
nightmorph wrote: | snip /etc/init.d/net.eth0 start snap |
/etc/conf.d/rc is a nice feature I can agree on that, but on the other hand if your lazy like me netplug and ifplugd is 2 nice tools.
And having to start net.ethX each time you plug in the cable (if you move between locations alot) it will just irritate you (atleast I
get irritated by that). _________________ HP NC 4010, Pentium-M 725 1.6GHz w/ 1Gb RAM, 60Gb Hitachi Travelstar.
Running Gentoo-2.6.21-r4 (again as 2.6.22 kernels hogs CPU), all but SD reader works fine. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Wed Oct 24, 2007 11:19 am Post subject: |
|
|
Yeah netplug and ifplugd are very useful in fact |
|
Back to top |
|
|
gohmdoree Guru
Joined: 12 Oct 2004 Posts: 533
|
Posted: Fri Nov 23, 2007 6:24 pm Post subject: |
|
|
thanks, took me forever to try and remember that. was looking in the udev/rules.d dir |
|
Back to top |
|
|
|