From a209a95cebfba75eff3f65836a79b33bc10bc701 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 20 Jan 2017 16:32:58 -0600 Subject: Use flag ENABLED in /etc/default like other MTS services --- recipes-navigation/gpsd/gpsd/gpsd | 14 +++++++------- recipes-navigation/gpsd/gpsd/gpsd-default | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'recipes-navigation') 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 -- cgit v1.2.3