diff options
Diffstat (limited to 'recipes-support/ntp')
-rw-r--r-- | recipes-support/ntp/files/ntpd-init.patch | 6 |
1 files changed, 3 insertions, 3 deletions
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. |