mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
e6f17288e3
Added rc.* files and *.desktop files. Added udev rules and scripts. Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
41 lines
890 B
Bash
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
|
|
|