		ifscheme
		--------

	'ifscheme' is a small utility specific to the Debian
distribution. You can use it as a mapping for ifup to manage user
selected network schemes.
	To install this package, just copy the two shell scripts into
/usr/local/bin.
	Joey Hess <joey@dragon.kitenet.net> is the author of
'ifscheme", I just collected it because I use it. Below you will find
the author's original explanation. More details can be found in the
man page or in the documentation of Wireless Tools.

	Jean II

-------------------------------------------------------------

/etc/network/interfaces is much more flexible than it appears. It can probably
do everything pcmcia schemes can do, and more. Here is part of mine:

auto wlan0
mapping wlan0
        script /usr/local/bin/ifscheme-mapping

iface wlan0-home inet static
        address 192.168.1.5
        gateway 192.168.1.1
        netmask 255.255.255.0
        wireless_mode ad-hoc
        wireless_essid wortroot
        wireless_nick dragon
        wireless_channel 1

iface wlan0-away inet dhcp
        wireless_mode managed

Now I can type 'ifscheme -s away' when I leave home, rather like
cardctl scheme.

The ifscheme script is at http://bugs.debian.org/154444. If the request in
bug #154442 is implemented, it will become very flexible indeed..

Debian will hopefully be using this same file eventually for pcmcia network
devices too. It's already doable but takes a little work. This is all rather
rough and badly documented so far.

You can also do mapping based on the MAC address, if you want specific
configuration on specific card.  See
/usr/share/doc/ifupdown/examples/get-mac-address.sh and the stanza in
/usr/share/doc/ifupdown/examples/network-interfaces.gz that uses it.
This comes back to the problem I alluded to with mapping scripts not
being "nestable" yet, and bug #154442. You can do what you want today,
but you may need to write your own mapping script which uses a
combination of MAC address and scheme info to return a stanza name to
ifupdown.

-------------------------------------------------------------

	Hugo Haas <hugo@larve.net> added support for "map" statements
in mapping :

------------
mapping eth0
    script ifscheme-mapping
    map eth0-masq masquerading
    map eth0-* anywhere

iface masquerading inet dhcp
iface anywhere inet dhcp
------------

	This works mostly. If you migrate away from a scheme using a
wildcard mapping, the interface configuration will not be properly
changed. Patch welcomed, but that's not totally trivial.

	Jean II

