summaryrefslogtreecommitdiff
path: root/gpsd.xml
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2011-01-10 23:48:33 +0300
committerEric S. Raymond <esr@thyrsus.com>2011-01-11 09:37:00 -0500
commit4adbf95a9fcb50e5c9558c324b888bfb735a878b (patch)
tree393510c532dda8a14d169dadf71768858879cec7 /gpsd.xml
parent7781fa6a47c5fafecfc25c36b26531966615201a (diff)
downloadgpsd-4adbf95a9fcb50e5c9558c324b888bfb735a878b.tar.gz
Add device activation/deactivation hook
This adds possibility for a system integrator to define custom hooks that are executed on device activation and deactivation. Since there's no standard way to control power consumption of different gps devices out there, the designers of embedded appliances usually provide a system-specific way to do power management of a GPS module. This might be e.g. a power_on sysfs node. This patch adds an opportunity for a system integrator to transparently enable power for device as soon as any client starts requesting data from it and to disable power on deactivation (which normally happens 60 seconds after the last client who needed it disconnected). Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'gpsd.xml')
-rw-r--r--gpsd.xml14
1 files changed, 14 insertions, 0 deletions
diff --git a/gpsd.xml b/gpsd.xml
index b474e110..75e06cf4 100644
--- a/gpsd.xml
+++ b/gpsd.xml
@@ -303,6 +303,13 @@ added by a control-socket command (see <xref linkend='devices'/> for
details on this). Daemon startup will abort with an error if neither
any devices nor a control socket are specified.</para>
+<para>When a device is activated (i.e. a client requests data from it),
+gpsd attempts to execute a hook from
+<filename>/etc/gpsd/device-hook</filename> with first command line argument
+set to the pathname of the device and the second to
+<option>ACTIVATE</option>. On deactivatation it does the same passing
+<option>DEACTIVATE</option> for the second argument.</para>
+
<para>Clients communicate with the daemon via textual request and
responses. It is a bad idea for applications to speak the protocol
directly: rather, they should use the
@@ -1866,6 +1873,13 @@ device if no GPS device was specified on the command line does not
exist.</para>
</listitem>
</varlistentry>
+<varlistentry>
+<term><filename>/etc/gpsd/device-hook</filename></term>
+<listitem>
+<para>Optional file containing the device activation/deactivation script.
+</para>
+</listitem>
+</varlistentry>
<!--
<varlistentry>
<term><filename>/usr/share/gpsd/dgpsip-servers</filename></term>