On Fri, Jul 26, 2002 at 09:16:36AM -0400, Joey Hess wrote: > Joey Hess wrote: > > I'm thinking of something equivilant to cardctl scheme. > In amoungst all the rambling in this message, I think this one bit is worth > thinking about. Such a program -- call it ifscheme -- would need to be a > tad more complicated than I made out since it should down and up > interfaces which are mapped using it when the scheme changes. I think you're misunderstanding the way mappings work. Basically they're totally scriptable, so "when the scheme changes" is, in general, undeterminable. There are a few reasonable ways (IMO) that you can do mappings: * scheme based -- setup a file /etc/network/scheme, and change it by hand whenever you go somewhere else * network autodetection -- before configuring the interface, bring it up "anonymously" and do some pings, arpings, or run tcpdump to try to figure out where you are, then configure based on that * GPS autodetection -- have a GPS hooked up, and configure your network settings based on your /real/ location In particular for the middle one, there's no reliable way of realising that the scheme has "changed'. > Would you take such a program in ifupdown? It sounds kinda like you just want some utilities to support "scheme based" configuration easily. I don't think that should go into ifupdown proper (ie, it should just be some separate scripts), but it'd probably make more sense to put it in ifupdown.deb than anywhere else. Something like: mapping eth0 script network-scheme iface eth0-home inet static ... iface eth0-work inet static ... should be able to be made work pretty easily, without any changes to /sbin/ifup. 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. ``If you don't do it now, you'll be one year older when you do.''
Attachment:
pgpSObmUBwGo0.pgp
Description: PGP signature