diff options
-rwxr-xr-x | recipes-navigation/gpsd/gpsd/gpsd | 4 |
1 files changed, 4 insertions, 0 deletions
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 |