From 0dd115625c6e0d57796cb43e22513dab1577bb80 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 6 Feb 2017 09:31:03 -0600 Subject: Do not error if gpsd is not installed --- recipes-support/ntp/files/ntpd-init.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'recipes-support') diff --git a/recipes-support/ntp/files/ntpd-init.patch b/recipes-support/ntp/files/ntpd-init.patch index 42fbbe5..2ef7e0b 100644 --- a/recipes-support/ntp/files/ntpd-init.patch +++ b/recipes-support/ntp/files/ntpd-init.patch @@ -1,6 +1,6 @@ diff -Naur old/ntpd new/ntpd ---- old/ntpd 2017-02-03 10:11:28.136849640 -0600 -+++ new/ntpd 2017-02-03 10:33:58.537991855 -0600 +--- old/ntpd 2017-02-06 09:21:52.607908299 -0600 ++++ new/ntpd 2017-02-06 09:22:52.417169090 -0600 @@ -1,6 +1,8 @@ -#! /bin/sh +#! /bin/bash @@ -24,7 +24,7 @@ diff -Naur old/ntpd new/ntpd - echo "done" + /usr/sbin/start-stop-daemon -N -20 --start -x /usr/sbin/ntpd --test -- -u ntp:ntp -p /var/run/ntp.pid "$@" \ + || return 1 -+ if ((GPSD_REQUIRED == 1)) && [[ -L /dev/gps0 ]] && [[ -f "${GNSSRST}" ]]; then ++ if [[ -x /usr/sbin/gpsd_ubx_settime ]] && ((GPSD_REQUIRED == 1)) && [[ -L /dev/gps0 ]] && [[ -f "${GNSSRST}" ]]; then + . /etc/default/gpsd + if ((SET_SYSTEM_CLOCK == 1)) && /usr/sbin/gpsd_ubx_settime ; then + # We just set the system time by the GPS. Should be within 2 seconds. -- cgit v1.2.3