slackbuilds_ponce/system/gpsd/gpsd.hotplug.wrapper
David Spencer e6f17288e3 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>
2011-09-21 19:48:31 -03:00

41 lines
890 B
Bash

#!/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