summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsd/gpsd
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-navigation/gpsd/gpsd/gpsd')
-rwxr-xr-xrecipes-navigation/gpsd/gpsd/gpsd6
1 files changed, 4 insertions, 2 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd
index 33a8470..95e2a84 100755
--- a/recipes-navigation/gpsd/gpsd/gpsd
+++ b/recipes-navigation/gpsd/gpsd/gpsd
@@ -72,8 +72,10 @@ do_start()
# 1 if daemon was already running
# 2 if daemon could not be started
- if [[ -n ${SET_GPS_SPEED} ]] ; then
- eval "${SET_GPS_SPEED}"
+ # If the SET_GPS_SPEED function exists, call it to set the GPS Speed.
+ what=$(type SET_GPS_SPEED 2>/dev/null)
+ if [[ $what =~ SET_GPS_SPEED[[:space:]]is[[:space:]]a[[:space:]]function ]] ; then
+ SET_GPS_SPEED
fi
/usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \