3 # This file is Copyright (c) 2010 by the GPSD project
4 # BSD terms apply: see the file COPYING in the distribution root for details.
6 if [ -r /etc/default/gpsd ]; then
8 elif [ -r /etc/sysconfig/gpsd ]; then
12 if [ -n $GPSD_OPTIONS ]; then
15 if [ -n $GPSD_SOCKET ]; then
19 if [ -n $USBAUTO ]; then
20 [ "$USBAUTO" = "true" ] || exit 0
23 if [ "$ACTION" = "remove" ] ; then
24 if echo $DEVLINKS | grep -q /dev/gps; then
25 exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
30 # This was formerly in /lib/udev/hotplug.functions
32 [ -e "$1" ] && return 0
35 count=$(( $count + 1 ))
36 [ -e "$1" ] && return 0
37 if [ $count -gt 60 ]; then
43 # wait for /usr & /var to be mounted
44 wait_for_file /usr/bin/python && \
45 wait_for_file /var/run && \
46 exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"