File: whereami.sgml

package info (click to toggle)
whereami 0.3.37
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 424 kB
  • sloc: sh: 1,094; perl: 524; makefile: 24
file content (300 lines) | stat: -rw-r--r-- 12,138 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [

<!-- Process this file with docbook-to-man to generate an nroff manual
     page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
     less'.  A typical entry in a Makefile or Makefile.am is:

whereami.8: whereami.sgml
	docbook-to-man $< > $@
  -->

  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
  <!ENTITY dhfirstname "<firstname>Andrew</firstname>">
  <!ENTITY dhsurname   "<surname>McMillan</surname>">
  <!-- Please adjust the date whenever revising the manpage. -->
  <!ENTITY dhdate      "<date>March 11, 2002</date>">
  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
       allowed: see man(7), man(1). -->
  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
  <!ENTITY dhemail     "<email>debian@mcmillan.net.nz</email>">
  <!ENTITY dhusername  "Andrew McMillan">
  <!ENTITY dhucpackage "<refentrytitle>whereami</refentrytitle>">
  <!ENTITY dhpackage   "whereami">

  <!ENTITY debian      "<productname>Debian GNU/Linux</productname>">
  <!ENTITY gnu         "<acronym>GNU</acronym>">
]>

<refentry>
  <refentryinfo>
    <address>
      &dhemail;
    </address>
    <author>
      &dhfirstname;
      &dhsurname;
    </author>
    <copyright>
      <year>2002</year>
      <holder>&dhusername;</holder>
    </copyright>
    &dhdate;
  </refentryinfo>
  <refmeta>
    &dhucpackage;

    &dhsection;
  </refmeta>
  <refnamediv>
    <refname>&dhpackage;</refname>

    <refpurpose>non-interatively ascertain the location of the
    computer and reconfigure the system appropriately.
    </refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>&dhpackage;</command>

      <arg><option>--debug </option></arg>
      <arg><option>--scriptdebug </option></arg>
      <arg><option>--syslog </option></arg>
      <arg><option>--noactions </option></arg>
      <arg><option>--nolocking </option></arg>
      <arg><option>--mapping </option></arg>
      <arg><option>--basedir <replaceable>directory</replaceable> </option></arg>
      <arg><option>--statedir <replaceable>directory</replaceable> </option></arg>
      <arg><option>--from <replaceable>location_list</replaceable> </option></arg>
      <arg><option>--run_from <replaceable>calling_program_tag</replaceable> </option></arg>
      <arg><option>location_list</option></arg>

    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>

    <para>`&dhpackage;' provides a configurable and extensible framework for
    automatic location-detection and reconfiguration of computers, typically
    laptops.</para>

  <refsect2>
    <title>Detection</title>

      <para>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.</para>

      <para><command>&dhpackage;</command> 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.</para>

    <para>For full detail on the discovery process, you should read the detect.conf (5)
    manpage.</para>

  </refsect2>

  <refsect2>
    <title>Configuration</title>

      <para>Configuration is handled through standard shell scripting.  A variety of small
      utility scripts are provided and the author is always willing to accept more.</para>

      <para>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.</para>

       <para>Once the script has been built, it is run to effect the necessary changes to
       the system configuration.</para>
  </refsect2>

  </refsect1>
  <refsect1>
    <title>OPTIONS</title>

    <para>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 :-)</para>

    <variablelist>
      <varlistentry>
        <term><option>--debug</option></term>
        <listitem>
          <para>Run in debugging mode.  A verbose output is provided and
          the resulting script is output to the screen and not executed.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--scriptdebug</option></term>
        <listitem>
          <para>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.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--syslog</option></term>
        <listitem>
          <para>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.</para>
          <para>In combination with <option>--scriptdebug</option> above, this can
          be very useful for debugging your configuration.  Also note that the default
          installation turns this on for apm and init actions.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--noactions</option></term>
        <listitem>
          <para>Just do the detection and print the location name.  Don't build and run
          the script from whereami.conf.</para>
          <para>You might do this if you wanted to use <command>&dhpackage;</command>'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 :-).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--nolocking</option></term>
        <listitem>
          <para><command>&dhpackage;</command> won't normally let two copies of
           &dhpackage; run at the same time.  Use this option if you can come up with
           a scenario where you should allow this to happen!</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--mapping</option></term>
        <listitem>
          <para>This will persuade <command>&dhpackage;</command> to do only the detection
          stage, and output a list of the detected locations, suitable for use as a
          mapping script with ifupdown.  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--hint <replaceable>locations</replaceable> </option></term>
        <listitem>
          <para>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.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--basedir <replaceable>directory</replaceable> </option></term>
        <listitem>
          <para>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.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--statedir <replaceable>directory</replaceable> </option></term>
        <listitem>
          <para>Specifies the state directory in which <command>&dhpackage;</command> will
          write files indicating the current and previous locations (iam , iwas) and the
          script which is run for this environment (whereiam.sh).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--from <replaceable>location_list</replaceable> </option></term>
        <listitem>
          <para>Overrides <command>&dhpackage;</command>'s knowledge of where you have come from.  The
          <replaceable>location_list</replaceable> will be a comma-separated list of the
          locations which you are leaving.</para>
          <para>Normally `<command>&dhpackage;</command>' 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.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>--run_from <replaceable>calling_program_tag</replaceable> </option></term>
        <listitem>
          <para>This provides a mechanism for calling software, such as init scripts, pcmcia startup
          or apm events, to pass some of that source information to <command>&dhpackage;</command>,
          where it is promptly ignored, at present.</para>
          <para>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!</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>location_list</option></term>
        <listitem>
          <para>Overrides <command>&dhpackage;</command>'s testing of where you are.  The
          <replaceable>location_list</replaceable> will be a comma-separated list of the
          locations which you are now at.</para>
          <para>You might use this if you wished to bypass the detection phase, using some
          other package to handle that.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
  <refsect1>
    <title>SEE ALSO</title>

    <para>detect.conf (5), whereami.conf (5)</para>

    <para>There is some further documentation in HTML available
    in /usr/share/doc/&dhpackage;/manual</para>
  </refsect1>
  <refsect1>
    <title>FILES</title>

    <variablelist>
      <varlistentry>
        <term><filename>/etc/whereami/detect.conf</filename></term>
        <listitem>
          <para>Defines the process of detection.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><filename>/etc/whereami/whereami.conf</filename></term>
        <listitem>
          <para>Defines the actions performed as a result of entering, leaving, or remaining
          within a particular location.</para>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>
  <refsect1>
    <title>KNOWN BUGS</title>

    <para>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.</para>

    <para>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 `<command>dpkg-reconfigure whereami</command>' and respond to the questions.</para>
  </refsect1>
  <refsect1>
    <title>AUTHOR</title>

    <para>This manual page was written by &dhusername; &lt;&dhemail;&gt; for
      the &debian; system (but may be used by others).  Permission is
      granted to copy, distribute and/or modify this document under
      the terms of the <acronym>GPL</acronym> version 2.
    </para>

  </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->