Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Eth0 always start but not in runlevel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bourane
n00b
n00b


Joined: 25 Mar 2007
Posts: 30

PostPosted: Sun Oct 21, 2007 11:23 am    Post subject: Eth0 always start but not in runlevel Reply with quote

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
View user's profile Send private message
Ehnvis
Guru
Guru


Joined: 13 Jun 2006
Posts: 305
Location: /dev/random

PostPosted: Sun Oct 21, 2007 11:53 am    Post subject: Reply with quote

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
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Sun Oct 21, 2007 11:54 am    Post subject: Reply with quote

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
View user's profile Send private message
bourane
n00b
n00b


Joined: 25 Mar 2007
Posts: 30

PostPosted: Sun Oct 21, 2007 12:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
bourane
n00b
n00b


Joined: 25 Mar 2007
Posts: 30

PostPosted: Sun Oct 21, 2007 12:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Oct 21, 2007 11:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
tylerwylie
Guru
Guru


Joined: 19 Sep 2004
Posts: 458
Location: /US/Georgia/Atlanta

PostPosted: Mon Oct 22, 2007 2:12 am    Post subject: Reply with quote

Netmount all over again!


netplug ftw!
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Tue Oct 23, 2007 4:06 am    Post subject: Reply with quote

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
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Oct 23, 2007 12:03 pm    Post subject: Reply with quote

Or maybe ifplug ?
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Tue Oct 23, 2007 1:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Oct 23, 2007 5:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Tue Oct 23, 2007 5:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Wed Oct 24, 2007 1:02 am    Post subject: Reply with quote

Ok, thanks :)
Back to top
View user's profile Send private message
96140
Retired Dev
Retired Dev


Joined: 23 Jan 2005
Posts: 1324

PostPosted: Wed Oct 24, 2007 1:21 am    Post subject: Reply with quote

--

Last edited by 96140 on Fri Sep 13, 2013 8:57 am; edited 2 times in total
Back to top
View user's profile Send private message
Ehnvis
Guru
Guru


Joined: 13 Jun 2006
Posts: 305
Location: /dev/random

PostPosted: Wed Oct 24, 2007 6:49 am    Post subject: Reply with quote

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
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Wed Oct 24, 2007 11:19 am    Post subject: Reply with quote

Yeah netplug and ifplugd are very useful in fact :)
Back to top
View user's profile Send private message
gohmdoree
Guru
Guru


Joined: 12 Oct 2004
Posts: 533

PostPosted: Fri Nov 23, 2007 6:24 pm    Post subject: Reply with quote

thanks, took me forever to try and remember that. was looking in the udev/rules.d dir
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum