diff options
author | John Klug <john.klug@multitech.com> | 2017-05-05 16:37:42 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-05-05 16:38:37 -0500 |
commit | 038660f103660ddbcf6cd638d10ecc457224efea (patch) | |
tree | 65590ba3d8af5eaa98abd5958a60b2b7552287d6 /recipes-navigation | |
parent | 69b36b582e59fe646675dfa31900826799764615 (diff) | |
download | meta-mlinux-038660f103660ddbcf6cd638d10ecc457224efea.tar.gz meta-mlinux-038660f103660ddbcf6cd638d10ecc457224efea.tar.bz2 meta-mlinux-038660f103660ddbcf6cd638d10ecc457224efea.zip |
Exit if there is no GPS capability
Diffstat (limited to 'recipes-navigation')
-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 |