summaryrefslogtreecommitdiff
path: root/recipes-support/ntp
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-02-03 18:16:48 -0600
committerJohn Klug <john.klug@multitech.com>2017-02-03 18:16:48 -0600
commit8097da2837488c31472d29f28a5585058ccf846f (patch)
tree0686472efbf2c539c7ca3a4ac5b0ecabdf329dc2 /recipes-support/ntp
parent5a7f59302b63aad3b09772bf5bf9b55d78f10399 (diff)
downloadmeta-mlinux-8097da2837488c31472d29f28a5585058ccf846f.tar.gz
meta-mlinux-8097da2837488c31472d29f28a5585058ccf846f.tar.bz2
meta-mlinux-8097da2837488c31472d29f28a5585058ccf846f.zip
ntpd -pq added back in
Diffstat (limited to 'recipes-support/ntp')
-rw-r--r--recipes-support/ntp/files/ntpd-init.patch12
1 files changed, 8 insertions, 4 deletions
diff --git a/recipes-support/ntp/files/ntpd-init.patch b/recipes-support/ntp/files/ntpd-init.patch
index d1c3a84..42fbbe5 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 13:19:42.629257684 -0600
++++ new/ntpd 2017-02-03 10:33:58.537991855 -0600
@@ -1,6 +1,8 @@
-#! /bin/sh
+#! /bin/bash
@@ -11,7 +11,7 @@ diff -Naur old/ntpd new/ntpd
# ntpd init.d script for ntpdc from ntp.isc.org
test -x /usr/sbin/ntpd -a -r /etc/ntp.conf || exit 0
-@@ -18,13 +20,25 @@
+@@ -18,13 +20,29 @@
}
}
startdaemon(){
@@ -27,7 +27,11 @@ diff -Naur old/ntpd new/ntpd
+ if ((GPSD_REQUIRED == 1)) && [[ -L /dev/gps0 ]] && [[ -f "${GNSSRST}" ]]; then
+ . /etc/default/gpsd
+ if ((SET_SYSTEM_CLOCK == 1)) && /usr/sbin/gpsd_ubx_settime ; then
-+ # System time was just set by the GPS.
++ # We just set the system time by the GPS. Should be within 2 seconds.
++ # Now that we are close to the correct system time, we
++ # use the ntpd one shot option to get to less than
++ # 250mS error so that we don't waste time adjusting the clock.
++ /usr/sbin/ntpd -gq
+ /usr/sbin/start-stop-daemon -N -20 --start -x /usr/sbin/ntpd -- -u ntp:ntp -p /var/run/ntp.pid "$@"
+ else
+ # Need a GPS fix before startint ntp. Try again later.
@@ -44,7 +48,7 @@ diff -Naur old/ntpd new/ntpd
}
stopdaemon(){
echo -n "Stopping ntpd: "
-@@ -34,24 +48,38 @@
+@@ -34,24 +52,38 @@
case "$1" in
start)