summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrecipes-navigation/gpsd/gpsd/gpsd14
-rw-r--r--recipes-navigation/gpsd/gpsd/gpsd-default3
2 files changed, 8 insertions, 9 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd
index 6674028..ed86ecf 100755
--- a/recipes-navigation/gpsd/gpsd/gpsd
+++ b/recipes-navigation/gpsd/gpsd/gpsd
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
### BEGIN INIT INFO
# Provides: gpsd
# Required-Start: $remote_fs $network
@@ -51,9 +51,6 @@ fi
#
do_start()
{
- if ((GPSD_NOSTART != 0)) ; then
- exit 0
- fi
/usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \
-- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \
|| return 1
@@ -119,9 +116,12 @@ do_status() {
case "$1" in
start)
- echo "Starting $DESC" "$NAME"
- do_start
- exit $?
+ if ! [[ $ENABLED =~ ^[yY][eE][sS]$ ]] ; then
+ exit 0
+ fi
+ echo "Starting $DESC" "$NAME"
+ do_start
+ exit $?
;;
stop)
echo "Stopping $DESC" "$NAME"
diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default
index f9c1bec..da697bc 100644
--- a/recipes-navigation/gpsd/gpsd/gpsd-default
+++ b/recipes-navigation/gpsd/gpsd/gpsd-default
@@ -1,3 +1,4 @@
+ENABLED="yes"
GPSD_SOCKET="/var/run/gpsd.sock"
GPSD_OPTIONS="-n -D 1"
@@ -8,8 +9,6 @@ GPS_LINE=/dev/ttyXRUSB2
GPS_BAUD=115200
GPS_DEVICES="$GPS_LINE /dev/pps0"
-GPSD_NOSTART=0
-
GPS_FIXFILE=/var/run/gpsfix
# GPSD/UBlox Lock requiremnt