diff options
author | Paul Fertser <fercerpav@gmail.com> | 2011-01-10 23:48:33 +0300 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-01-11 09:37:00 -0500 |
commit | 4adbf95a9fcb50e5c9558c324b888bfb735a878b (patch) | |
tree | 393510c532dda8a14d169dadf71768858879cec7 /gpsd.xml | |
parent | 7781fa6a47c5fafecfc25c36b26531966615201a (diff) | |
download | gpsd-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.xml | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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> |