diff options
author | John Klug <john.klug@multitech.com> | 2017-05-05 16:37:42 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-06-19 19:14:23 -0500 |
commit | 2694d15ac9166791ffb3cff9faf6711a19047fb0 (patch) | |
tree | 8a8467f62e7f815a1dbb9ce25befc1d595bec8a0 /recipes-navigation/gpsd | |
parent | 9c6078dc40425dcc46aa2202c30fbf5e93487253 (diff) | |
download | meta-mlinux-2694d15ac9166791ffb3cff9faf6711a19047fb0.tar.gz meta-mlinux-2694d15ac9166791ffb3cff9faf6711a19047fb0.tar.bz2 meta-mlinux-2694d15ac9166791ffb3cff9faf6711a19047fb0.zip |
Exit if there is no GPS capability
Diffstat (limited to 'recipes-navigation/gpsd')
-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 |