gpsd hotplug script broken

Bug #112494 reported by Eric Anopolsky
14
Affects Status Importance Assigned to Milestone
gpsd (Debian)
Fix Released
Unknown
gpsd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gpsd

OS: Ubuntu Feisty Fawn 7.04
Package: gpsd
Package version: 2.33-4

When I plug in a supported USB-based GPS receiver, gpsd should start by itself and recognize the device. Because /lib/udev/gpsd.hotplug.wrapper is broken, this does not happen.

Normally, when I plug in my GPS receiver, it is dealt with by udev according to the rules in "/etc/udev/gpsd.rules". This file tells udev to create the device file and symlink and run the script "/lib/udev/gpsd.hotplug.wrapper".

For debugging purposes, I have added two touch statements to that file, so that it looks like this:
-----BEGIN FILE-----
#! /bin/sh

touch /tmp/got_to_1

. /lib/udev/hotplug.functions

touch /tmp/got_to_2

# wait for /usr & /var to be mounted
wait_for_file /usr/bin/python && \
wait_for_file /var/run && \
  exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
-----END FILE-----

When I plug in my USB GPS receiver, the file /tmp/got_to_1 is always created and the file /tmp/got_to_2 is never created. I believe this is because /lib/udev/hotplug.functions does not exist.

Revision history for this message
Olivier Mengué (dolmen) wrote :

Also /lib/udev/hotplug.functions which is referenced in gpsd.hotpllug.wrapper does'nt even exist on my system (Ubuntu 7.04).

Revision history for this message
Olivier Mengué (dolmen) wrote :

Ubuntu 7.04
gpsd 2.33-4
GPS: Garmin eTrex Legend C (USB: 091e:003)

gpsd is working correctly when launched manually:
$ sudo gpsd /dev/ttyUSB0

However hotplug launch is not working.

I added the following two lines to /etc/udev/gpsd.rules, without success (/dev/gpd0 is still not created at plug-in time and gpsd is not started):
# Garmin eTrex Legend C (kernel driver: garmin_gps)
SUBSYSTEM=="tty", SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"

Revision history for this message
Olivier Mengué (dolmen) wrote :

My platform is x86_64 (Intel).

Revision history for this message
Eric Anopolsky (erpo41) wrote :

> gpsd is working correctly when launched manually:
> $ sudo gpsd /dev/ttyUSB0

You don't need sudo as long as you are a member of the dialout group, which I believe is the default.

Revision history for this message
Olivier Mengué (dolmen) wrote :

With my addition to /etc/udev/gpsd.rules, /dev/gps0 is correctly created when the GPS is plugged.

The issue with gpsd startup remains.

Revision history for this message
Bernd Zeimetz (bzed) wrote :

No idea what the status was back in 2.33.
Since 2.34 it was disabled for good reasons, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=442467 for example.
It is fixed since 2.37-1, working around the mentioned bug by a debconf question.

If you update to the latest Ubuntu release you should be able to enable hotplug support manually as described in /usr/share/doc/gpsd/README.Debian.gz.

Somebody should backport 2.37-4 for Feisty propbably... Or just use Debian, recent gpsd versions for Etch are available on backports.org.

Changed in gpsd:
status: New → Unknown
Changed in gpsd:
status: Unknown → Fix Released
Greg A (etulfetulf)
Changed in gpsd:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.