Sorry for not noticing this earlier, and I hope the Cc's aren't too much. On Sun, Jan 23, 2000 at 11:28:39PM -0300, Nicolás Lichtmaier wrote: > > > > I don't think so - indeed policy says that packages shouldn't depend > > > > on environment variables for their correct behaviour(3.9). [...] > > If we make the environment variables policy I say we make an /etc/proxies > > file policy as well and require packages have a wrapper which checks > > command line flags (if applicable) > > environment variables (required) > > home directory dotfiles (if applicable) > > /etc/proxies (required) > Look. This is widely implemented... A few people like you are proposing > things just to modify things, but without offering any improvement. You are > trying to "dilute" the thing, to turn it in an endless discussion.
Okay, that's probably enough context. ifupdown will shortly support network autodetection (ie, it works for me, but I haven't tidied it up or uploaded it anywhere yet). So you'll be able to say things like: iface home inet dhcp iface lug inet static address 192.168.105.26 network 192.168.105.0 netmask 255.255.255.0 gateway 192.168.105.1 along with some other stuff to tell it how to work out whether you're at home or at your local LUG, and have things Just Work(tm). Conveniently dhcp automatically sets up the correct name server in resolv.conf. So it'd be nice to have ifupdown somehow cope with the same thing, with a schema like: iface lug inet static address 192.168.105.26 network 192.168.105.0 netmask 255.255.255.0 gateway 192.168.105.1 name-server 130.102.2.15 This works right now too, as long as you have a script like: #!/bin/sh if [ "$IF_NAME_SERVER" = "" ]; then exit 0; fi case $MODE in "start") ( echo "##BEGIN AUTOAJADDED" for ns in $IF_NAME_SERVER; do echo "nameserver $ns"; done echo "##END AUTOAJADDED" ) >> /etc/resolv.conf ;; "stop") perl -i -n -e '$ignore = 1 if (m/^..BEGIN AUTOAJADDED$/); print unless ($ignore); $ignore = 0 if (m/^..END AUTOAJADDED$/);' /etc/resolv.conf ;; esac as, say, /etc/network/if-{up,down}.d/20update-resolv The next thing I'd like to write is a 20update-proxy script. My current plans are just to set $http_proxy and Netscape and everything to point to localhost:8080, and have my script redirect that port to the real proxy. However, changing /etc/proxies *would* be a much easier way of doing this, and it would probably be the only real way of getting it to work if some of the places I want to connect to use proxies and others don't. It would also require much less effort on a user's part to get their system to Just Work (tm) if these scripts were included in netbase, or similar. So I think /etc/proxies would actually have a practical improvement. OTOH, http_proxy (and optionally {ftp,gopher,wais,no,*}_proxy too) should go into policy anyway, I suspect. Cheers, aj -- Anthony Towns <[EMAIL PROTECTED]> <http://azure.humbug.org.au/~aj/> I don't speak for anyone save myself. GPG encrypted mail preferred. ``We reject: kings, presidents, and voting. We believe in: rough consensus and working code.'' -- Dave Clark
pgpnY2J9gdxFm.pgp
Description: PGP signature