Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 511584

Summary: sci-geosciences/gpsd - gpsd ignores /etc/conf.d/gpsd options when started by hotplugging
Product: Gentoo Linux Reporter: Mark Wagner <carnildo>
Component: Current packagesAssignee: Sci-geo Project <sci-geosciences>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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