If you aren't using the Debian package to install this good luck to
you!  On the other hand it shouldn't be tricky.

 * * * * You should refer to the man pages, which are current * * * * *

Whereami is comprised of several important parts:
 - The /usr/sbin/whereami script which detects where you are
 - The /etc/whereami/whereami.conf file which configures it all
 - The /etc/whereami/tests directory which holds location tests
 - The /etc/whereami/scripts directory which holds useful scripts

The important (useful) scripts for network configuration are all
located in /usr/share/whereami

To install things you need to write some small scripts - generally one for
each location which you need to detect.  There should be some example scripts
in the /usr/doc/whereami/examples directory which are reasonable working
models.

Hopefully you can detect most of your sites from the DHCP addresses that are
assigned when you activate your network interface.  I'm lucky that most of mine
are.  If they aren't then 'divine' will probably help a lot.

Once your scripts can detect your locations, you can configure whereami to
act on this behaviour by editing /etc/whereami/whereami.conf, and there should
be an example in the /usr/doc/whereami/whereami.conf directory.

The Main Things:

1)  PCMCIA integration

This is only necessary if you want whereami to run on insertion of
your PCMCIA network card.  The normal installation will run whereami
during the boot process anyway.

The /etc/pcmcia/network script needs to call /usr/sbin/whereami at
some point.  The best way I have found to do this is to insert the
following two lines into /etc/pcmcia/network:
      elif is_true $WHEREAMI ; then
			    /usr/sbin/whereami $DEVICE || exit 1
just before "elif is_true $DHCP ; then" (around line 52) and modify
    if is_true $PUMP || is_true $BOOTP .... (around line 130)
to read
		if is_true $WHEREAMI || is_true $PUMP || is_true $BOOTP ....

Then you are free to add the following two lines into
/etc/pcmcia/network.opts :
    # Use WHEREAMI (via /usr/sbin/whereami)? [y/n]
		WHEREAMI="y"
just before or after the (similar) DHCP line.


2)	Tests

All tests which are successful should "echo $LOCATION >>iwillbe".
All tests which mean that more testing is futile or not required
          should set "LOCATED=1".
Look at the example tests which I have provided.  These test for the
following three typical(?) situations: a particular PCI device (to
see if we're in the docking station), a particular network (to choose
an appropriate fixed IP address), and (finally) the assignment of a
particular DHCP address for when we're on a DHCP based network.

The script I use for identifying the network for a fixed-ip situation
uses 'fping' which works something like 'divine' does and allows very
fast analysis of network traffic.


3)	whereami.conf

All lines to appear in the location script should start with a '+', '-' or '=',
followed by a location name (or the word 'any')i, followed by a space.  The remainder
of the line is the script commands which will be executed as appropriate.

+any will be executed at all times
-any will be executed at all times
=any will be executed at all times

+site1 will be executed when you first connect at 'site1' and were elsewhere
-site1 will be executed when you are elsewhere and you were at site1 last
=site1 will be executed whenever you are at site1 and you connect

In general, the [+=-]any line is useful for something you want to happen every
time you connect toa  network.

The '+' lines are useful for setting things like network resolvers, bind configs,
mail or internet connectivity settings and so forth.

The '-' lines are useful for un-setting things that are only set for a single
(or a very few) locations.

The '=' lines are most useful for setting things like mounting drives, and for
making regular copies of things onto backup locations.

That's an oversimplification, of course, and I'm sure that you will all think
of things that you can do with it that will go further than this.
