From 2694d15ac9166791ffb3cff9faf6711a19047fb0 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 5 May 2017 16:37:42 -0500 Subject: Exit if there is no GPS capability --- recipes-navigation/gpsd/gpsd/gpsd | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'recipes-navigation') diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index ed86ecf..fcee788 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -28,10 +28,14 @@ NAME=gpsd DAEMON=/usr/sbin/$NAME PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME +CAPABILITY=/sys/devices/platform/mts-io/capability/gps # Read configuration, if present [ -r /etc/default/$NAME ] && . /etc/default/$NAME +# Exit if we have no GPS capability +( [[ -f $CAPABILITY ]] && (($(cat $CAPABILITY) == 1)) ) || exit 0 + # Exit if no gps found ([[ -n $GPS_LINE ]] && [[ -c $GPS_LINE ]]) || exit 0 -- cgit v1.2.3