summaryrefslogtreecommitdiff
path: root/recipes-support/ntp
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support/ntp')
-rw-r--r--recipes-support/ntp/files/ntp.conf.patch30
-rw-r--r--recipes-support/ntp/ntp_%.bbappend2
2 files changed, 23 insertions, 9 deletions
diff --git a/recipes-support/ntp/files/ntp.conf.patch b/recipes-support/ntp/files/ntp.conf.patch
index 1a40d24..3d7a652 100644
--- a/recipes-support/ntp/files/ntp.conf.patch
+++ b/recipes-support/ntp/files/ntp.conf.patch
@@ -1,7 +1,7 @@
-diff -Naru orig.new/ntp.conf up/ntp.conf
---- orig.new/ntp.conf 2017-05-30 10:44:16.311034239 -0500
-+++ up/ntp.conf 2017-05-30 10:37:42.837793409 -0500
-@@ -1,16 +1,47 @@
+diff -Naru old/ntp.conf new/ntp.conf
+--- old/ntp.conf 2017-07-18 17:48:59.436221921 -0500
++++ new/ntp.conf 2017-07-18 18:00:54.392325489 -0500
+@@ -1,17 +1,59 @@
-# This is the most basic ntp configuration file
# The driftfile must remain in a place specific to this
# machine - it records the machine specific clock error
@@ -46,10 +46,24 @@ diff -Naru orig.new/ntp.conf up/ntp.conf
+server 127.127.28.2 prefer true
+fudge 127.127.28.2 time1 0.000 refid PPS
+
++# orphanwait says that after 30 seconds, we can't find a server, we
++# will use the local clock. This means ntp will hang for 30 seconds
++# during boot if we are not configured for an NTP server.
++tos orphanwait 30
++
# Using local hardware clock as fallback
- # Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
-+# The stratum should be a high value so this does not get chosen
-+# except in dire circumstances.
- server 127.127.1.0
+-# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
+-server 127.127.1.0
++
++# minpoll of 5 means 2^5 seconds or 32 seconds. So first we wait 30
++# seconds if we can't get a response from another server, and then
++# if we don't get the response, we will use the local clock after
++# a 32 second poll interval. So the NTP will hold up the boot for
++# 32 seconds if we don't have a good NTP server.
++server 127.127.1.0 minpoll 5
++# the local clock should always be set to a high stratum
++# (low priority), since it
++# is the system clock, which is not a good choice.
fudge 127.127.1.0 stratum 14
# Defining a default security setting
+ restrict default
diff --git a/recipes-support/ntp/ntp_%.bbappend b/recipes-support/ntp/ntp_%.bbappend
index 6ce3cb2..12cc8cf 100644
--- a/recipes-support/ntp/ntp_%.bbappend
+++ b/recipes-support/ntp/ntp_%.bbappend
@@ -1,4 +1,4 @@
-PR .= ".mlinux2"
+PR .= ".mlinux3"
SRC_URI += " file://ntpd-default \
file://ntp.conf.patch;patchdir=.. \