.TH "whereami" "8" .SH "NAME" whereami \(em non-interatively ascertain the location of the computer and reconfigure the system appropriately. .SH "SYNOPSIS" .PP \fBwhereami\fR [\fB\-\-debug \fP] [\fB\-\-scriptdebug \fP] [\fB\-\-syslog \fP] [\fB\-\-noactions \fP] [\fB\-\-nolocking \fP] [\fB\-\-mapping \fP] [\fB\-\-basedir \fIdirectory\fR \fP] [\fB\-\-statedir \fIdirectory\fR \fP] [\fB\-\-from \fIlocation_list\fR \fP] [\fB\-\-run_from \fIcalling_program_tag\fR \fP] [\fBlocation_list\fP] .SH "DESCRIPTION" .PP `whereami' provides a configurable and extensible framework for automatic location-detection and reconfiguration of computers, typically laptops. .SS "Detection" .PP Detection is handled through the use of various network and hardware probing tools. These tools have been wrapped in small shell scripts to interface them to whereami, but the end-user with different requirements may wish to extend these in some situations. .PP \fBwhereami\fR processes the file /etc/whereami/detect.conf performing the tests specified in there in order to decide which location the computer is currently located at. .PP For full detail on the discovery process, you should read the detect.conf (5) manpage. .SS "Configuration" .PP Configuration is handled through standard shell scripting. A variety of small utility scripts are provided and the author is always willing to accept more. .PP The file /etc/whereami/whereami.conf is parsed and a script built containing the actions specified there which are associated with the locations found during the detection phase. Actions may be configured for when leaving, remaining, or arriving at a location. .PP Once the script has been built, it is run to effect the necessary changes to the system configuration. .SH "OPTIONS" .PP This program follows the modern command-line syntax preceding each option with a double dash (`\-\-'). Short form options are also available, but are not documented (RTFC :\-) .IP "\fB\-\-debug\fP" 10 Run in debugging mode. A verbose output is provided and the resulting script is output to the screen and not executed. .IP "\fB\-\-scriptdebug\fP" 10 Run in script debugging mode. Each script supplied with `whereami' will `set \-o xtrace' if the environment variable `DEBUGWHEREAMI' is set to non-blank. This parameter will set that variable. The script which is built by whereami will also respond to the environment variable. .IP "\fB\-\-syslog\fP" 10 Output some logging information to syslog. The 'user' facility is used for this, and it provides an insight into which locations whereami has chosen, and why. .IP "" 10 In combination with \fB\-\-scriptdebug\fP above, this can be very useful for debugging your configuration. Also note that the default installation turns this on for apm and init actions. .IP "\fB\-\-noactions\fP" 10 Just do the detection and print the location name. Don't build and run the script from whereami.conf. .IP "" 10 You might do this if you wanted to use \fBwhereami\fR's detection, but use something else for configuration. Perhaps you could achieve the same end with a very simple whereami.conf, but there should always be two ways to do anything :\-). .IP "\fB\-\-nolocking\fP" 10 \fBwhereami\fR won't normally let two copies of whereami run at the same time. Use this option if you can come up with a scenario where you should allow this to happen! .IP "\fB\-\-mapping\fP" 10 This will persuade \fBwhereami\fR to do only the detection stage, and output a list of the detected locations, suitable for use as a mapping script with ifupdown. .IP "\fB\-\-hint \fIlocations\fR \fP" 10 Provides some hints to the detection process. The locations set by this parameter (a comma-delimited list) may be referenced by rules in your detect.conf. .IP "\fB\-\-basedir \fIdirectory\fR \fP" 10 Specifies the base directory which will contain both the detect.conf and whereami.conf. The default is `/etc/whereami' which should be right for normal use. .IP "\fB\-\-statedir \fIdirectory\fR \fP" 10 Specifies the state directory in which \fBwhereami\fR will write files indicating the current and previous locations (iam , iwas) and the script which is run for this environment (whereiam.sh). .IP "\fB\-\-from \fIlocation_list\fR \fP" 10 Overrides \fBwhereami\fR's knowledge of where you have come from. The \fIlocation_list\fR will be a comma-separated list of the locations which you are leaving. .IP "" 10 Normally `\fBwhereami\fR' maintains a history of locations, so that it knows where you have come from (and what might consequently have to be de-configured) as well as knowing that your location has changed. .IP "\fB\-\-run_from \fIcalling_program_tag\fR \fP" 10 This provides a mechanism for calling software, such as init scripts, pcmcia startup or apm events, to pass some of that source information to \fBwhereami\fR, where it is promptly ignored, at present. .IP "" 10 I have a possibly misguided idea that this might be useful somehow, but I can't think of any application of it at this point! .IP "\fBlocation_list\fP" 10 Overrides \fBwhereami\fR's testing of where you are. The \fIlocation_list\fR will be a comma-separated list of the locations which you are now at. .IP "" 10 You might use this if you wished to bypass the detection phase, using some other package to handle that. .SH "SEE ALSO" .PP detect.conf (5), whereami.conf (5) .PP There is some further documentation in HTML available in /usr/share/doc/whereami/manual .SH "FILES" .IP "\fB/etc/whereami/detect.conf\fP" 10 Defines the process of detection. .IP "\fB/etc/whereami/whereami.conf\fP" 10 Defines the actions performed as a result of entering, leaving, or remaining within a particular location. .SH "KNOWN BUGS" .PP This man page only documents the current perl version of whereami. For backward compatibility with people's setups, it is possible to configure your system to run the older shell-script, which is currently undocumented. .PP If you wish to switch from the shell script to the new perl program you will need to create an appropriate `detect.conf' file to define your location detection parameters. Your existing whereami.conf file should be compatible with this version. Once you have created a detect.conf file in /etc/whereami you should run `\fBdpkg-reconfigure whereami\fR' and respond to the questions. .SH "AUTHOR" .PP This manual page was written by Andrew McMillan for the \fBDebian GNU/Linux\fP system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GPL version 2. .\" created by instant / docbook-to-man, Fri 02 Nov 2007, 07:10