Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 511584 - sci-geosciences/gpsd - gpsd ignores /etc/conf.d/gpsd options when started by hotplugging
Summary: sci-geosciences/gpsd - gpsd ignores /etc/conf.d/gpsd options when started by ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sci-geo Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-27 05:34 UTC by Mark Wagner
Modified: 2014-10-30 21:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wagner 2014-05-27 05:34:10 UTC
When gpsd is started by udev hotplugging (ie. when a gps receiver is plugged into an already-running system), the configuration in /etc/conf.d/gpsd is ignored.

This can be fixed by changing /lib/udev/gpsd.hotplug to read the file if it exists, by changing the section at the top from

if [ -r /etc/default/gpsd ]; then
  . /etc/default/gpsd
elif [ -r /etc/sysconfig/gpsd ]; then
  . /etc/sysconfig/gpsd
  GPSD_OPTIONS=$OPTIONS
  GPSD_SOCKET=$CONTROL_SOCKET
fi

to

if [ -r /etc/default/gpsd ]; then
  . /etc/default/gpsd
elif [ -r /etc/conf.d/gpsd ]; then
  . /etc/conf.d/gpsd
elif [ -r /etc/sysconfig/gpsd ]; then
  . /etc/sysconfig/gpsd
  GPSD_OPTIONS=$OPTIONS
  GPSD_SOCKET=$CONTROL_SOCKET
fi