From 75b853c9fd44d63086ecda236c5afe5ef84e6d08 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 16 Jan 2017 17:40:19 -0600 Subject: Must exit if GPS not found on old conduit --- recipes-navigation/gpsd/gpsd/gpsd | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'recipes-navigation/gpsd') diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index e12d1c4..257728d 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -29,12 +29,15 @@ DAEMON=/usr/sbin/$NAME PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - # Read configuration, if present [ -r /etc/default/$NAME ] && . /etc/default/$NAME +# Exit if no gps found +([[ -n $GPS_LINE ]] && [[ -c $GPS_LINE ]]) || exit 0 + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then GPSD_SOCKET=/var/run/gpsd.sock fi -- cgit v1.2.3