]> git.pld-linux.org Git - packages/gpsd.git/blob - gpsd-udev.patch
- updated to 2.39
[packages/gpsd.git] / gpsd-udev.patch
1 diff -NurpP --minimal gpsd-2.37.orig/gpsd.hotplug gpsd-2.37/gpsd.hotplug
2 --- gpsd-2.37.orig/gpsd.hotplug 2007-06-26 20:54:32.000000000 +0200
3 +++ gpsd-2.37/gpsd.hotplug      2008-09-15 22:16:07.785330941 +0200
4 @@ -7,7 +7,7 @@
5  import sys, time, os, syslog, glob, socket, stat
6  
7  CONTROL_SOCKET = "/var/run/gpsd.sock"
8 -WHEREAMI = "/etc/hotplug/usb/gpsd.hotplug"
9 +WHEREAMI = "/lib/udev/gpsd.hotplug"
10  
11  def gpsd_control_connect():
12      "Acquire a connection to the GPSD control socket."
13 diff -NurpP --minimal gpsd-2.37.orig/gpsd.hotplug.wrapper gpsd-2.37/gpsd.hotplug.wrapper
14 --- gpsd-2.37.orig/gpsd.hotplug.wrapper 1970-01-01 01:00:00.000000000 +0100
15 +++ gpsd-2.37/gpsd.hotplug.wrapper      2008-09-15 22:13:04.628685277 +0200
16 @@ -0,0 +1,22 @@
17 +#! /bin/sh
18 +# $Id$
19 +
20 +#debian addition with a pld twist:
21 +[ ! -r /etc/sysconfig/gpsd ] || . /etc/sysconfig/gpsd
22 +[ "$START_DAEMON" = "yes" ] || exit 0
23 +[ "$USBAUTO" = "yes" ] || exit 0
24 +
25 +
26 +if [ "$ACTION" == "remove" ] ; then
27 +  if [ $(echo $DEVLINKS | grep -q /dev/gps) ] ; then
28 +    exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
29 +  fi
30 +  exit 0
31 +fi
32 +
33 +. /lib/udev/hotplug.functions
34 +
35 +# wait for /usr & /var to be mounted
36 +wait_for_file /usr/bin/python && \
37 +wait_for_file /var/run && \
38 +  exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
39 diff -NurpP --minimal gpsd-2.37.orig/gpsd.udev gpsd-2.37/gpsd.udev
40 --- gpsd-2.37.orig/gpsd.udev    1970-01-01 01:00:00.000000000 +0100
41 +++ gpsd-2.37/gpsd.udev 2008-09-15 22:11:55.875772637 +0200
42 @@ -0,0 +1,39 @@
43 +# udev rules for gpsd
44 +# $Id$
45 +#
46 +# GPSes don't have their own USB device class.  They're serial-over-USB
47 +# devices, so what you see is actually the ID of the serial-over-USB chip.
48 +# Fortunately, just two of these account for over 80% of consumer-grade
49 +# GPS sensors.  The gpsd.hotplug.wrapper script will tell a running gpsd
50 +# that it should look at the device that just went active, because it
51 +# might be a GPS.
52 +#
53 +# The following setup works on Debian - something similar will apply on
54 +# other distributions:
55 +#
56 +#   /etc/udev/gpsd.rules
57 +#   /etc/udev/rules.d/025_gpsd.rules -> ../gpsd.rules
58 +#   /lib/udev/gpsd.hotplug.wrapper
59 +#   /lib/udev/gpsd.hotplug
60 +#
61 +# Setting the link in /etc/udev/rules.d activates the rule and determines
62 +# when to run it on boot (similar to init.d processing).
63 +
64 +SUBSYSTEM!="tty", GOTO="gpsd_rules_end"
65 +
66 +# Prolific Technology, Inc. PL2303 Serial Port
67 +SYSFS{idVendor}=="067b", SYSFS{idProduct}=="2303", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
68 +# ATEN International Co., Ltd UC-232A Serial Port [pl2303]
69 +SYSFS{idVendor}=="0557", SYSFS{idProduct}=="2008", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
70 +# FTDI 8U232AM
71 +SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
72 +# Cypress M8/CY7C64013 (DeLorme uses these)
73 +SYSFS{idVendor}=="1163", SYSFS{idProduct}=="0100", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
74 +# PS-360 OEM (Microsoft GPS sold with Street and Trips 2005)
75 +SYSFS{idVendor}=="067b", SYSFS{idProduct}=="aaa0", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
76 +# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB)
77 +SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
78 +
79 +ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug.wrapper"
80 +
81 +LABEL="gpsd_rules_end"
82 --- gpsd-2.37.orig/gpsd.sysconfig       1970-01-01 01:00:00.000000000 +0100
83 +++ gpsd-2.37/gpsd.sysconfig    2008-09-15 23:34:54.671941394 +0200
84 @@ -0,0 +1,4 @@
85 +START_DAEMON="yes"
86 +DAEMON_OPTS=""
87 +DEVICES=""
88 +USBAUTO="yes"
This page took 0.084595 seconds and 3 git commands to generate.