summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-01-20 16:32:58 -0600
committerJohn Klug <john.klug@multitech.com>2017-01-20 16:32:58 -0600
commita209a95cebfba75eff3f65836a79b33bc10bc701 (patch)
tree4f5548b6f5ed176c31cabd107449304a688f139f
parent49abc027832e86a0b919ea6e2ddf2fa2e24a2979 (diff)
downloadmeta-mlinux-a209a95cebfba75eff3f65836a79b33bc10bc701.tar.gz
meta-mlinux-a209a95cebfba75eff3f65836a79b33bc10bc701.tar.bz2
meta-mlinux-a209a95cebfba75eff3f65836a79b33bc10bc701.zip
Use flag ENABLED in /etc/default like other MTS services
-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