From e0dc5fbcf8465f710f9f2f64009d9f488b8a17bb Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 12 Jan 2017 12:06:51 -0600 Subject: Do not change the baud rate if gpsd is already running --- recipes-navigation/gpsd/gpsd/gpsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'recipes-navigation') diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index 9c59f10..e12d1c4 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -55,6 +55,9 @@ do_start() if ((GPSD_NOSTART != 0)) ; then exit 0 fi + /usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \ + -- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \ + || return 1 # Return # 0 if daemon has been started # 1 if daemon was already running @@ -66,9 +69,6 @@ do_start() echo Expect a timeout error here. Need this error. gpsctl -T 2 -f $GPS_LINE stty -F $GPS_LINE $GPS_BAUD - /usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \ - -- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \ - || return 1 /usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES \ || return 2 -- cgit v1.2.3