diff options
Diffstat (limited to 'recipes-navigation')
-rwxr-xr-x | recipes-navigation/gpsd/gpsd/gpsd | 9 |
1 files changed, 6 insertions, 3 deletions
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 |