summaryrefslogtreecommitdiff
path: root/gpsd.rules
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2007-12-06 01:12:28 +0000
committerEric S. Raymond <esr@thyrsus.com>2007-12-06 01:12:28 +0000
commitcb6bbcaee00a94c428a6c48a349020e346929bfa (patch)
tree72085cae26510cdff440349e471a03f4a886d000 /gpsd.rules
parent3e098f8216fcfd75e096a507617fb0763be6792e (diff)
downloadgpsd-cb6bbcaee00a94c428a6c48a349020e346929bfa.tar.gz
Revised rules to support device removal.
Diffstat (limited to 'gpsd.rules')
-rw-r--r--gpsd.rules14
1 files changed, 8 insertions, 6 deletions
diff --git a/gpsd.rules b/gpsd.rules
index ad64c2dc..5813a5ba 100644
--- a/gpsd.rules
+++ b/gpsd.rules
@@ -22,16 +22,18 @@
SUBSYSTEM!="tty", GOTO="gpsd_rules_end"
# Prolific Technology, Inc. PL2303 Serial Port
-SUBSYSTEM=="tty", SYSFS{idVendor}=="067b", SYSFS{idProduct}=="2303", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
+SUBSYSTEM=="tty", SYSFS{idVendor}=="067b", SYSFS{idProduct}=="2303", SYMLINK="gps%n", ENV{GPS_DEV}="true", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# ATEN International Co., Ltd UC-232A Serial Port [pl2303]
-SUBSYSTEM=="tty", SYSFS{idVendor}=="0557", SYSFS{idProduct}=="2008", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
+SUBSYSTEM=="tty", SYSFS{idVendor}=="0557", SYSFS{idProduct}=="2008", SYMLINK="gps%n", ENV{GPS_DEV}="true", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# FTDI 8U232AM
-SUBSYSTEM=="tty", SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
+SUBSYSTEM=="tty", SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6001", SYMLINK="gps%n", ENV{GPS_DEV}="true", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# Cypress M8/CY7C64013 (DeLorme uses these)
-SUBSYSTEM=="tty", SYSFS{idVendor}=="1163", SYSFS{idProduct}=="0100", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
+SUBSYSTEM=="tty", SYSFS{idVendor}=="1163", SYSFS{idProduct}=="0100", SYMLINK="gps%n", ENV{GPS_DEV}="true", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# PS-360 OEM (Microsoft GPS sold with Street and Trips 2005)
-SUBSYSTEM=="tty", SYSFS{idVendor}=="067b", SYSFS{idProduct}=="aaa0", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
+SUBSYSTEM=="tty", SYSFS{idVendor}=="067b", SYSFS{idProduct}=="aaa0", SYMLINK="gps%n", ENV{GPS_DEV}="true", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB)
-SUBSYSTEM=="tty", SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
+SUBSYSTEM=="tty", SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", SYMLINK="gps%n", ENV{GPS_DEV}="true", RUN+="/lib/udev/gpsd.hotplug.wrapper"
+
+ACTION=="remove", ENV{GPS_DEV}=="true", RUN+="/lib/udev/gpsd.hotplug.wrapper"
LABEL="gpsd_rules_end"