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

Bug#615600: BOOTIF= kernel commandline option does not work



Marc Haber <mh+debian-bugs@zugschlus.de> writes:

> On Wed, Mar 02, 2011 at 04:44:07PM +0100, Ferenc Wagner wrote:
> 
>> Maybe, I didn't try it on SMP.  write_net_rules has some locking to
>> prevent such issues, though.
>
> My rule hasn't, but it shouldn't do anything if the script is silent,
> should it?

Your rule shouldn't do anything than possibly importing a property into
the event environment, and the bootif script only reads constant data,
so it shouldn't need any locking either.

>>>> Actually, your rule worked perfectly well, despite that you don't
>>>> reserve the eth0 name, just try to assign it even if it's taken
>>>> already.  Unless I overlook something, this should be fixed.
>>>
>>> How do I reserve a name?
>> 
>> By renaming eth0 to something else, unless it isn't the boot interface.
>
> So my script should print INTERFACE_NAME="foo0" to its standard output
> if invoked for an interface that is eth0 and not the boot interface?
> And who is responsible to rename it back into the ethx namespace?

Nobody, I'm afraid.  What you want isn't particularly simple, especially
that ethX devices may be appearing concurrently, so you'll have to
synchronize much like write_net_rules does.  You can't even guarantee
that there will be an eth0 at the end!  I'd probably start by modifying
write_net_rules, it already has some special code handling eth0.
-- 
Regards,
Feri.



Reply to: