gpsd/udev.gpsd
Martin Pluskal 7af9494fb4 Accepting request 794991 from home:adkorte
- Update to version 3.20
  * Change README into an asciidoc file and publish HTML from it
  * Add NED and geoid_sep to gps_fix_t and TPV JSON.
  * Add "-e NED" to ubxtool to enable NED messages.
  * gpsdata.separation replaced by gpsdata.fix.geoid_sep.
  * Remove nofloats build option.
  * TPV JSON "alt" is now fixed at WGS84.  Probably.
  * xgps now uses XGPSOPTS environment variable.
  * add health variable to satellite_t
  * change satellite_t elevation and azimuth to double
  * satellite_t elevation, azimuth, and ss use NAN for unknown value.
  * add altMSL, altHAE, and depth, to gps_fix_t
  * altitude in gps_fix_t is deprecated and undefined
  * wgs84_separation() now return EGM2008 computed from 5x5 degree base data.
  * The best results are close to cm, the worst off up to 12m.
  * Move mag_var from gps_device_t to magnetic_var gps_data_t.
  * Added mag_var() to interpolate magnetic variation (deviation) from a table.
  * Remove true2magnetic() as mag_var() improves on it.
  * Remove TIMEHINT_ENABLE.  It only worked when enabled.
  * Remove NTP_ENABLE and NTPSHM_ENABLE.  It only worked when enabled.
  * Remove PPS_ENABLE and TIMING_ENABLE.
  * Add dgps_age and dgps_station to gps_fix_t
  * Convert all timestamp_t to timespec_t.
  * Remove FIXED_PORT_SPEED and FIXED_STOP_BITS build options.
  * Add -s [speed] and -f [framing] runtime options to gpsd.
  * A working CC and termios.h are mandatory.
  * use the current leap second to determine the current GPS epoch.
  * leapfetch.py, leapseconds.cache, timebase.h and leapfetch option gone.
- Remove 0001-Make-sure-Qgpsmm.pc-is-usable.patch (upstreamed)
- Fix legacy socket path

OBS-URL: https://build.opensuse.org/request/show/794991
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gpsd?expand=0&rev=132
2020-04-18 06:50:28 +00:00

48 lines
1.0 KiB
Bash

#!/bin/bash
CTRL_SOCK="/run/gpsd.socket"
DEV_NAME="/run/gpsd.device"
. /etc/sysconfig/gpsd
if [ "$GPSD_STARTBYUDEV" != "yes" ]; then
exit 1
fi
if [ "${ACTION}" = "remove" ]; then
GPSD_PID=$(pidof gpsd)
if [ -z "$GPSD_PID" ]; then
echo "Can't find gpsd!"
else
echo "Remove gpsd from pid: ${GPSD_PID}"
TTYDEV="/dev/$(basename $DEVPATH)"
TTYDEV_SAVE=$(cat ${DEV_NAME})
if [ "${TTYDEV}" = "${TTYDEV_SAVE}" ]; then
# send TERM signal
kill -15 ${GPSD_PID}
rm -f ${DEV_NAME}
fi
fi
else
case "$DEVPATH" in
*tty*)
TTYDEV="/dev/$(basename $DEVPATH)"
options="-F $CTRL_SOCK $GPSD_OPTIONS"
if [ -n "$GPSD_PORT" ]; then
options="$options -S $GPSD_PORT"
else
GPSD_PORT=2947
fi
echo "Action '${ACTION}' Launch gpsd to $TTYDEV with $options"
/usr/sbin/gpsd $options ${TTYDEV}
echo "${TTYDEV}" > ${DEV_NAME}
(sleep 1 && echo "F=$TTYDEV" >/dev/tcp/localhost/$GPSD_PORT) &
;;
esac
fi 2>&1 | /bin/logger -t gpsd