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

Re: hotplugging /e/n/i "auto" interfaces



On Thu, 2004-04-08 at 13:34, J.D. Hood wrote:
> When installing hotplug one may select one of three policies
> governing which network interfaces are ifup'ped when they are
> created by the kernel.  One of these policies is for hotplug to
> ifup all interfaces listed after the "auto" keyword in
> /etc/network/interfaces.  Can someone please explain to me what
> sense this makes?
> 
> So far as I can see, it makes no sense.  Interfaces listed after
> the "auto" keyword are brought up by the "ifup -a" command in
> /etc/rcS.d/S40networking.  This provides a way of listing those
> interfaces to be brought up during the boot sequence -- i.e.,
> interfaces which _aren't_ to be left to hotplug or to the admin to
> bring up later.  Typically this list includes lo and the names of
> interfaces that are known to be present at boot time.

Sorry, but it does make some sense. If you see the word 'auto' as
derived from 'automatic', it can be understood as 'bring this interface
up automatically'. So the confusion comes from the misleading name 'aut'
where 'on-boot' was really meant.

Actually, I filed a bug report months ago against hotplug which required
exactly that feature, because at that time hotplugg'ed each interface in
/e/n/i, which was very annoying, and I thought this is the only
solution.

I would not remove it now, because it does not hurt (at least IIRC
/etc/init.d/networking will not cause too much trouble if it cannot up
an iface that is not available).

> The interfaces brought up by S40networking obviously don't also need
> to be brought up by S40hotplug.

You will get an error, but it does not hurt much. Haven't tested it, but
that's what I suspect.

> It _might_ make sense for hotplug to offer a policy of ifup'ping
> those interfaces _not_ listed as "auto" in /etc/network/interfaces.
> But I do not see the sense in ifup'ping those interfaces that _are_
> listed as "auto".
> 
> I contacted the hotplug maintainer about this and he says that he
> added this feature because "people wanted it".  My suspicion is
> that those who asked for this feature don't understand what "auto"
> means in the context of /etc/network/interfaces and that they are
> asking for the system to be changed so that it conforms to their
> misunderstanding.  If my suspicion is correct then we'll soon see
> a bug filed against netbase complaining that "auto" interfaces
> shouldn't be brought up in S40networking because they are already
> brought up by hotplug, and once this bug is closed we will have to
> add a _new_ feature to ifupdown to do what "auto" did before.
> 
> Of course I could be wrong about this and I would welcome enlightenment.
> 
> If it turns out that my suspicion is true then I will ask the hotplug
> maintainer to remove the "hotplug auto interfaces" policy option.

If it causes not too much trouble it can be left there.

I think we need a real and clean solution here. Using the mapping for
hotplug is not a 'real' solution, but more a hack, and does not
contribute to userfriendliness, intuition and homogenuous
configurations.

How about this: add an option to the auto stanza, like:

auto eth0
	event hotplug

and similar for ifplugd, waproamd, manual and others. The default for
event could be 'boot'. Let ifupdown provide a small script/program so
that each package can easily find out if it is responsible or not. The
event can be anything, so that future packages can easily use that
feature.

Of course, this needs to be in post sarge.

In the meantime hotplug could have a list of interfaces it may bring up,
similar as to how it is done for ifplugd.

Greetngs,
Oliver

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: