Gentoo Archives: gentoo-user

From: Peter Lewis <prlewis@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Network start delay?
Date: Thu, 08 Feb 2007 13:34:46
Message-Id: 200702081323.51989.prlewis@letterboxes.org
In Reply to: Re: [gentoo-user] Network start delay? by Iain Buchanan
1 On Wednesday 07 February 2007 23:12, Iain Buchanan wrote:
2 > On Wed, 2007-02-07 at 10:37 +0000, Peter Lewis wrote:
3 > > I start my wireless network with the script
4 > >
5 > > /etc/init.d/net.eth2
6 > >
7 > > which is started by init in the "default" runlevel.
8 > >
9 > > I also have
10 > >
11 > > /etc/init.d/netmount
12 > >
13 > > to mount some samba shares, and which is also started my init in the
14 > > "default" runlevel, but depends on "net" from the line:
15 > >
16 > > local myneed="net"
17 > >
18 > > So, as I understand it, this makes sure that init starts net.eth* before
19 > > starting netmount. That's good. However, eth2 is on a DHCP-enabled
20 > > connection and takes a few seconds to come up after starting the script.
21 > > By the time netmount is started, net.eth2 has not finished coming up, so
22 > > netmount fails and the samba shares are never mounted automatically.
23 > >
24 > > Is there a way to make the netmount script wait for a route to exist
25 > > before attempting to connect?
26 >
27 > net.eth2 "shouldn't" return (by default) until it has a dhcp address,
28 > which means all other scripts starting after it will wait until you have
29 > an address.
30 >
31 > Things you might have done to change the default behaviour include
32 > RC_PARALLEL_STARTUP, and RC_NET_STRICT_CHECKING in /etc/conf.d/rc.
33 >
34 > You can set them to "no", and "yes" respectively and see if the
35 > following scripts wait...
36
37 Thanks for this. I just checked and I have those variables set up correctly.
38
39 Yes, upon closer inspection, the problem is slightly weirder.
40
41 I'm using an Intel ipw3945 wireless device, which requires a daemon to run
42 to "regulate it" or something. So, I also have /etc/init.d/ipw3945d start at
43 boot. This must start before I can access eth2. However, I've actually just
44 noticed that I don't explicitly start net.eth2 in any runlevel. It seems that
45 this is kicked into action by ipw3945d somewhere (though I can't see where).
46 The /etc/init.d/net.eth2 process just seems to fork off to the background,
47 meaning that init carries on booting, and hence fails on netmount.
48
49 Anyone any experience with this?
50
51 Cheers,
52
53 Pete.
54 --
55 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Network start delay? Iain Buchanan <iaindb@××××××××××××.au>