On Thu, Jul 25, 2002 at 10:24:05PM -0400, Joey Hess wrote: > iface wlan0-home inet static > wifi_mode ad-hoc > wifi_essid mywifilan > wifi_id mylaptop > wifi_channel 1 > wifi_rate 11 > wifi_wep off > # wifi_key foo > address 192.168.1.5 > gateway 192.168.1.1 > netmask 255.255.255.0 Right. You can do this by having /etc/network/if-pre-up.d/wifi and /etc/network/if-down.d/wifi check for $IF_WIFI_MODE etc environment variables, and, if they're present, do stuff. > Actually that same stanza would work for a more traditional linux > orinoco card as well; the information is the same, the way its fed to > the drivers much different. In that case you should also have something like: wifi-style old or wifi-style new . (note that -'s in parameter names are translated to _'s for $IF_FOO_BAR. personally I think -'s look better than _'s in this context) > iface eth0 inet static > wifi_type wlan-ng Right. > I think that'd be quite nice. Getting every bit of network configuration > info in one file, including the wireless stuff would be swell! Exactly. The above is all supported btw. It's not documented yet because I've been busy on other things -- actually it might be documented in either the BTS or in the NMUed ifupdown in unstable. I think it'd be nice to start getting as much of Debian's network stuff using this as possible. For example, you could do bridging like this, with a stanza like: iface brg0 inet static ... bridge eth0 eth1 Similarly it ought to be straightforward to have scripts that update your resolv.conf, or proxy settings or so forth based on the existance of parameters like: add-dns 192.168.1.2 192.168.2.5 proxy-hosts proxy.example.com:80 proxy2.example.com:8080 Unfortunately I haven't had time to do much about any of this. > I expect this would not be a big change (with luck, just a few lines), > and I'd be happy to tackle it if you lack time. The only problem with it all is that it doesn't work really well with things like DHCP and PPP -- there's no way for them to pass the parameters they get (my IP address/netmask/etc, upstream DNS, proxies, etc) through ifupdown and on to the other scripts that might want them (firewalling stuff, etc)... Yet, anyway. Cheers, aj -- Anthony Towns <email@example.com> <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.''
Description: PGP signature