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

Re: hotplug and ifup



On Sun, Mar 21, 2004 at 10:19:11AM -0500, David B Harris wrote:
> Anthony Towns <aj@azure.humbug.org.au> wrote:
> > > What's being proposed is for that to change from "bring the interface up
> > > on boot" to "bring the interface up when the hardware becomes available
> > > (and check to see if it's there on boot too)"
> > That's not a reasonable change if we continue to imagine people might
> > be using their systems without hotplug installed.
> Sorry, I don't think I was clear; the last half of that sentence, "and
> check to see if it's there on boot too", was meant to be
> /etc/init.d/networking, not hotplug. From my perspective (as an admin
> and as a user), it makes sense for me for these "auto" interfaces to be
> brought up on boot if they're there, or later if they show up later.

Sure, but from ifup's perspective, having two meanings for a single line
isn't really plausible.

> Which bit does it is sort of irrelevant, though I suppose it'd be nice
> if one subsystem handled it.

Yeah, it would make sense, but I can't see any way of using "auto" to do it.

So, I guess there are a few questions when an interface becomes available.
One is how it became available -- sometimes it's just there on boot,
sometimes it's found by hotplug, sometimes it's noticed that there's an
active link by ifplugd. And we want some way to specify "yes, do something
about that" to those programs for some interfaces, but not for others.

For bootup and for ifplugd you probably know which interface names correspond
to what. For hotplug, you plausibly don't. Maybe:

	# Bring these up on boot
	auto lo eth0

	# Bring these up if they're plugged in
	allow-hotplug eth2 eth3

	# Bring these up when a cable's connected
	allow-ifplugd eth1

with "ifup -a" being the same as "ifup lo eth0", and "ifup --on=hotplug
eth1 eth2" being the same as "ifup eth2" would work okay. That is,
letting you write "allow-<foo> <interface names...>" where <foo> is
defined by the package/program invoking ifup, and <interface names...>
are glob patters matching which interfaces that subsystem should look at.

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

             Linux.conf.au 2004 -- Because we could.
           http://conf.linux.org.au/ -- Jan 12-17, 2004

Attachment: signature.asc
Description: Digital signature


Reply to: