[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Interface start-up ordering sequence, multiple passes?



On Thu, 11 Sep 2003, Bill Nottingham wrote:
> Pekka Savola (pekkas netcore fi) said: 
> > There seems to be no facility to run a script "in the second pass" i.e., 
> > after all the interfaces have been brought up.
> > 
> > Both of these facilities would seem to be useful, espcially being able to 
> > say "run these commands after interface X has been brought up".
> 
> There's /sbin/ifup-local.

Yep, but that's slightly different, AFAICS.  It's run after everything
else has been done on that specific interface, but still sequentially.

Let's take an example, eth0 and eth1.

Eth0 is initialized first.  There is something there that should be run 
only after both eth1 and eth0 have been initialized.  You can't do that, 
even with ifup-local because ifup-local is run in the context of eth0, not 
eth1.

What you _could_, in theory, do is make ifup-local check that if the 
device is _eth1_, then do some operations on eth0.  But that's IMHO just 
way too kludgy approach, which assumes too much knowledge of the system in 
question.. and you want to be generic.

What _might_ work is is having some system in init.d/network, so that 
first 'ifup $device boot' would be run for all the devices, and soon one 
would run 'ifup $device 2ndphase' for all the devices (the most of which 
don't do anything).

An IPv6-specific way would be to add the stuff in the 'init.ipv6-global
start post' phase (but that has problems of it's own, because it's run in
the general context, not in the context of an interface), I guess, or more
generally, add it to the init.d/network.

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]