summaryrefslogtreecommitdiff
path: root/system/gpsd/gpsd.hotplug.wrapper
diff options
context:
space:
mode:
authorDavid Spencer <baildon.research@googlemail.com>2011-09-07 23:21:01 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2011-09-21 19:48:31 -0300
commite6f17288e3d02ddfe3eeb063b637d0986c7bce5f (patch)
tree02765da686bdf6831a4e3dfb22e518835e509d02 /system/gpsd/gpsd.hotplug.wrapper
parent9080a47e3d7349cc58bf15b944af817a25cf39b2 (diff)
downloadslackbuilds-e6f17288e3d02ddfe3eeb063b637d0986c7bce5f.tar.gz
system/gpsd: Downgraded to version 2.95 due to API breakage.
Added rc.* files and *.desktop files. Added udev rules and scripts. Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/gpsd/gpsd.hotplug.wrapper')
-rw-r--r--system/gpsd/gpsd.hotplug.wrapper41
1 files changed, 41 insertions, 0 deletions
diff --git a/system/gpsd/gpsd.hotplug.wrapper b/system/gpsd/gpsd.hotplug.wrapper
new file mode 100644
index 0000000000..429db379ce
--- /dev/null
+++ b/system/gpsd/gpsd.hotplug.wrapper
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# This file is Copyright (c) 2010 by the GPSD project
+# BSD terms apply: see the file COPYING in the distribution root for details.
+# [Modified to add Slackware-friendly conf file]
+
+PATH=/usr/sbin:$PATH
+export PATH
+
+if [ -r /etc/default/gpsd ]; then
+ . /etc/default/gpsd
+elif [ -r /etc/sysconfig/gpsd ]; then
+ . /etc/sysconfig/gpsd
+ GPSD_OPTIONS=$OPTIONS
+ GPSD_SOCKET=$CONTROL_SOCKET
+elif [ -r /etc/rc.d/rc.gpsd.conf ]; then
+ . /etc/rc.d/rc.gpsd.conf
+fi
+
+if [ -n "$GPSD_OPTIONS" ]; then
+ export GPSD_OPTIONS
+fi
+if [ -n "$GPSD_SOCKET" ]; then
+ export GPSD_SOCKET
+fi
+
+if [ -n "$USBAUTO" ]; then
+ [ "$USBAUTO" = "true" ] || exit 0
+fi
+
+if [ "$ACTION" = "remove" ] ; then
+ if echo $DEVLINKS | grep -q /dev/gps; then
+ exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
+ fi
+ exit 0
+fi
+
+if [ -x /usr/bin/python ]; then
+ exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
+fi
+