Bug#561574: Wrong test in /lib/udev/gpsd.hotplug.wrapper prevents proper device removal
Package: gpsd Version: 2.90-2 Severity: normal Tags: patch -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The test to check if the removed device is a gps in /lib/udev/gpsd.hotplug.wrapper is wrong and always fails, preventing gpsd from freeing the device (i.e. if you unplug and replug your USB gps it will move from /dev/ttyUSB0 to /dev/ttyUSB1 and gpsd will think it has two GPSes) Patch attached. Cheers, Luca - -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (995, 'unstable'), (991, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-toshiba (SMP w/2 CPU cores) Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages gpsd depends on: ii debconf [debconf-2.0] 1.5.28 Debian configuration management sy ii libc6 2.10.2-2 GNU C Library: Shared libraries ii libdbus-1-3 1.2.16-2 simple interprocess messaging syst ii libgps19 2.90-2 Global Positioning System - librar ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip ii netbase 4.39 Basic TCP/IP networking system ii python2.5.4-2An interactive high-level object-o Versions of packages gpsd recommends: ii udev 148-2 /dev/ and hotplug management daemo Versions of packages gpsd suggests: ii dbus 1.2.16-2 simple interprocess messaging syst ii gpsd-clients 2.90-2 Global Positioning System - client - -- debconf information: * gpsd/start_daemon: false * gpsd/device: * gpsd/daemon_options: -b * gpsd/socket: /var/run/gpsd.sock gpsd/brokenconfig: * gpsd/autodetection: true -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAksrZHMACgkQ+AQB36CPPlppMQCgr8d5X69pqYVyiSfZ/Hb5Pmik md4An0TdnaD0UbIfv8dwybxwlAXudvoe =CcPW -END PGP SIGNATURE- --- a/gpsd-2.90/debian/gpsd.hotplug.wrapper 2009-12-18 12:06:27.0 +0100 +++ b/gpsd-2.90/debian/gpsd.hotplug.wrapper 2009-12-18 2009-12-18 12:04:57.654228619 +0100 @@ -11,7 +11,7 @@ fi if [ $ACTION = remove ] ; then - if [ $(echo $DEVLINKS | grep -q /dev/gps) ] ; then + if echo $DEVLINKS | grep -q /dev/gps ; then exec /lib/udev/gpsd.hotplug $ACTION $DEVNAME fi exit 0
Bug#561574: Wrong test in /lib/udev/gpsd.hotplug.wrapper prevents proper device removal
tag 561574 fixed-upstream thanks Hi, good catch, thanks. I've fixed it upstream and try to ensure it will be shipped with the next Debian package :) Cheers, Bernd Luca Niccoli wrote: Package: gpsd Version: 2.90-2 Severity: normal Tags: patch The test to check if the removed device is a gps in /lib/udev/gpsd.hotplug.wrapper is wrong and always fails, preventing gpsd from freeing the device (i.e. if you unplug and replug your USB gps it will move from /dev/ttyUSB0 to /dev/ttyUSB1 and gpsd will think it has two GPSes) Patch attached. Cheers, Luca -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (995, 'unstable'), (991, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-toshiba (SMP w/2 CPU cores) Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages gpsd depends on: ii debconf [debconf-2.0] 1.5.28 Debian configuration management sy ii libc6 2.10.2-2 GNU C Library: Shared libraries ii libdbus-1-3 1.2.16-2 simple interprocess messaging syst ii libgps19 2.90-2 Global Positioning System - librar ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip ii netbase 4.39 Basic TCP/IP networking system ii python2.5.4-2An interactive high-level object-o Versions of packages gpsd recommends: ii udev 148-2 /dev/ and hotplug management daemo Versions of packages gpsd suggests: ii dbus 1.2.16-2 simple interprocess messaging syst ii gpsd-clients 2.90-2 Global Positioning System - client -- debconf information: * gpsd/start_daemon: false * gpsd/device: * gpsd/daemon_options: -b * gpsd/socket: /var/run/gpsd.sock gpsd/brokenconfig: * gpsd/autodetection: true -- Bernd ZeimetzDebian GNU/Linux Developer http://bzed.dehttp://www.debian.org GPG Fingerprints: 06C8 C9A2 EAAD E37E 5B2C BE93 067A AD04 C93B FF79 ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org