Gentoo Forums
Gentoo Forums
Quick Search: in
controlling order of start-up of network interfaces [SOLVED]
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
equaeghe
Apprentice
Apprentice


Joined: 22 Feb 2005
Posts: 171

PostPosted: Wed Feb 14, 2007 3:17 pm    Post subject: controlling order of start-up of network interfaces [SOLVED] Reply with quote

I have 3 network interfaces, 2 wire (eth0, an skge card; eth1, a via-rhine card), 1 wireless (ra0, a rt2500 card). All configured in /etc/conf.d/net.

Since the recent udev update making coldplug redundant, the startup procedure insists on starting up the wireless card first (something with "device initiated settings"). The wireless connection often fails (which is in itself no problem), but as it starts up first, gentoo thinks it has a net connection and tries to start ntp-client before starting the dependable wired network connections.

How do I solve this problem? I myself was thinking about finding a way to force a startup order of eth0, eth1, ra0, and ideally, ntp-client at the end.

Thanks for any suggestions,

Erik


Last edited by equaeghe on Tue Feb 20, 2007 5:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
Aszrael
Tux's lil' helper
Tux's lil' helper


Joined: 15 Feb 2005
Posts: 101
Location: Hannover/Germany

PostPosted: Thu Feb 15, 2007 5:23 am    Post subject: Reply with quote

I have no idea how to change order, but this could be a (dirty) workaround:
given that wired interfaces = eth0 & eth1 and wireless = eth2

remove eth2 from auto-startup in /etc/conf.d/rc
RC_PLUG_SERVICES="net.eth0 net.eth1 !net.eth2"
now start your wireless ether manually or by adding
"/etc/init.d/net.eth2 start" to /etc/conf.d/local.start
"/etc/init.d/net.eth2 stop" to /etc/conf.d/local.stop

possible drawback:
sometimes starting my ipw3945 with "/etc/init.d/net.eth2 start" throws errors on my system (maybe ipw3945d-problem)

Aszrael
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6101
Location: Blighty

PostPosted: Thu Feb 15, 2007 5:36 am    Post subject: Reply with quote

You can affect the ordering and dependencies of services in /etc/conf.d/foo by using
RC_NEED="bar"
or
RC_AFTER="bar"
or
RC_BEFORE="bar"
or
RC_USE="bar"

You can even provide your own if you so wish
RC_PROVIDE="bar"

/etc/conf.d/net extends this to
RC_NEED_eth1="net.eth0"

So that eth1 needs net.eth0 to be started - handy for bridges
I guess you need RC_AFTER_ra0="net.eth0 net.eth1" in /etc/conf.d/net
_________________
When baselayout tells you to update config files or things break WE REALLY DO MEAN IT

Please add SOLVED to the thread title if your issue has been
Strip comments from configs please
Back to top
View user's profile Send private message
equaeghe
Apprentice
Apprentice


Joined: 22 Feb 2005
Posts: 171

PostPosted: Mon Feb 19, 2007 9:11 am    Post subject: Reply with quote

UberLord,

Your suggestion of using RC_AFTER_ra0="net.eth0 net.eth1" in /etc/conf.d/net would be nice, but does not work, ra0 still starts up first.

However, RC_AFTER="net.eth0" in /etc/conf.d/ntp-client does work and solves this problem.

Could you comment on why the first solution might have failed (it interests me).

A question related to the use of the conf.d files: are user-created conf.d files for user-created init.d scripts with the same name automatically read?

Erik
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6101
Location: Blighty

PostPosted: Mon Feb 19, 2007 11:43 am    Post subject: Reply with quote

equaeghe wrote:
Could you comment on why the first solution might have failed (it interests me).


Could be a variety of reasons, but my favourite would have to be a baselayout bug in dependency ordering.
Should be fixed in baselayout-1.13 in portage.
_________________
When baselayout tells you to update config files or things break WE REALLY DO MEAN IT

Please add SOLVED to the thread title if your issue has been
Strip comments from configs please
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT - 5 Hours
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