summaryrefslogtreecommitdiff
path: root/gpsd.hotplug
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-04-12 11:06:07 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-04-12 11:06:07 -0400
commitb811e3911da46870cbd974d6690d20a9ced44d87 (patch)
treececbb257b000d3875c3d246d9a7c5b79f1d9c020 /gpsd.hotplug
parent790d444b6d53ebb0f80de16650a71bc1c440845a (diff)
downloadgpsd-b811e3911da46870cbd974d6690d20a9ced44d87.tar.gz
Make it possible to pass in options via /etc/default/gpsd
From a suggestion by Charles Curley.
Diffstat (limited to 'gpsd.hotplug')
-rw-r--r--gpsd.hotplug5
1 files changed, 4 insertions, 1 deletions
diff --git a/gpsd.hotplug b/gpsd.hotplug
index dd0deafa..7aca86cd 100644
--- a/gpsd.hotplug
+++ b/gpsd.hotplug
@@ -6,7 +6,8 @@
# ACTION = either "add" or "remove"
# DEVNAME = the full name of the USB device that was just activated
#
-# It will accept from /etc/sysconfig/gpsd the following config variables:
+# It will accept from /etc/sysconfig/gpsd or /etc/default/gpsd
+# the following config variables:
#
# CONTROL_SOCKET = location of the gpsd control socket
# OPTIONS = options to be passed to gpsd on launch
@@ -24,6 +25,8 @@ export PATH
if [ -r /etc/default/gpsd ]; then
. /etc/default/gpsd
+ GPSD_OPTIONS=$OPTIONS
+ GPSD_SOCKET=$CONTROL_SOCKET
elif [ -r /etc/sysconfig/gpsd ]; then
. /etc/sysconfig/gpsd
GPSD_OPTIONS=$OPTIONS