From 29d9d49e75f3371413efce6b67a850d1a54b3bea Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 20 Dec 2016 17:26:54 -0600 Subject: Add GPS specific configuration, add empty files/directories with permissions --- recipes-support/ntp/files/ntp.conf.patch | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 recipes-support/ntp/files/ntp.conf.patch (limited to 'recipes-support/ntp/files/ntp.conf.patch') diff --git a/recipes-support/ntp/files/ntp.conf.patch b/recipes-support/ntp/files/ntp.conf.patch new file mode 100644 index 0000000..0700553 --- /dev/null +++ b/recipes-support/ntp/files/ntp.conf.patch @@ -0,0 +1,51 @@ +diff -u old/ntp.conf new/ntp.conf +--- old/ntp.conf 2016-12-20 15:41:04.992738081 -0600 ++++ new/ntp.conf 2016-12-20 16:07:40.632709506 -0600 +@@ -1,7 +1,19 @@ +-# 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 + driftfile /etc/ntp.drift ++ ++# The following code is for evaluating the timeserver. ++# Remove the # to activate the statistics ++# statistics loopstats ++# statistics peerstats ++# statsdir /var/log/ntpstats ++# filegen peerstats file peerstats type day link enable ++# filegen loopstats file loopstats type day link enable ++ ++# This is the US timeserver pool. You should use a pool ++# close to your location. ++#pool us.pool.ntp.org iburst ++ + # This should be a server that is close (in IP terms) + # to the machine. Add other servers as required. + # Unless you un-comment the line below ntpd will sync +@@ -9,8 +21,26 @@ + # + # server time.server.example.com + # ++ ++logfile /var/log/ntp.log ++ ++restrict default kod nomodify notrap nopeer noquery ++restrict -6 default kod nomodify notrap nopeer noquery ++restrict 127.0.0.1 mask 255.255.255.0 ++restrict -6 ::1 ++ ++# GPS Serial data reference (NTP0) ++server 127.127.28.0 ++fudge 127.127.28.0 time1 0.080 refid GPS ++ ++# GPS PPS reference (NTP2) ++server 127.127.28.2 prefer ++fudge 127.127.28.2 time1 0.000 refid PPS ++ + # 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 + fudge 127.127.1.0 stratum 14 + # Defining a default security setting -- cgit v1.2.3 From 2ba73a35c4907336858320b31ce515a6aa10698f Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 21 Dec 2016 08:46:44 -0600 Subject: ntp.drift must be in a directory writable by ntp --- recipes-support/ntp/files/ntp.conf.patch | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'recipes-support/ntp/files/ntp.conf.patch') diff --git a/recipes-support/ntp/files/ntp.conf.patch b/recipes-support/ntp/files/ntp.conf.patch index 0700553..499dac5 100644 --- a/recipes-support/ntp/files/ntp.conf.patch +++ b/recipes-support/ntp/files/ntp.conf.patch @@ -1,11 +1,13 @@ diff -u old/ntp.conf new/ntp.conf ---- old/ntp.conf 2016-12-20 15:41:04.992738081 -0600 -+++ new/ntp.conf 2016-12-20 16:07:40.632709506 -0600 -@@ -1,7 +1,19 @@ +--- old/ntp.conf 2016-12-21 08:36:33.887646960 -0600 ++++ new/ntp.conf 2016-12-21 08:37:41.115645756 -0600 +@@ -1,7 +1,20 @@ -# 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 - driftfile /etc/ntp.drift +-driftfile /etc/ntp.drift ++# Driftfile must be in a directory owned by ntp ++driftfile /var/lib/ntp/ntp.drift + +# The following code is for evaluating the timeserver. +# Remove the # to activate the statistics @@ -22,7 +24,7 @@ diff -u old/ntp.conf new/ntp.conf # This should be a server that is close (in IP terms) # to the machine. Add other servers as required. # Unless you un-comment the line below ntpd will sync -@@ -9,8 +21,26 @@ +@@ -9,8 +22,26 @@ # # server time.server.example.com # -- cgit v1.2.3 From 3959907c3a6a8d78368de3c624155260a2d418fe Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 17 Jan 2017 12:06:49 -0600 Subject: Remove incorrect comments, and use syslog for logging --- recipes-support/ntp/files/ntp.conf.patch | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'recipes-support/ntp/files/ntp.conf.patch') diff --git a/recipes-support/ntp/files/ntp.conf.patch b/recipes-support/ntp/files/ntp.conf.patch index 499dac5..691d039 100644 --- a/recipes-support/ntp/files/ntp.conf.patch +++ b/recipes-support/ntp/files/ntp.conf.patch @@ -1,7 +1,7 @@ -diff -u old/ntp.conf new/ntp.conf ---- old/ntp.conf 2016-12-21 08:36:33.887646960 -0600 -+++ new/ntp.conf 2016-12-21 08:37:41.115645756 -0600 -@@ -1,7 +1,20 @@ +diff -Naur old/ntp.conf new/ntp.conf +--- old/ntp.conf 2017-01-17 12:00:15.560426583 -0600 ++++ new/ntp.conf 2017-01-17 12:02:11.968426337 -0600 +@@ -1,16 +1,44 @@ -# 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 @@ -23,20 +23,19 @@ diff -u old/ntp.conf new/ntp.conf + # This should be a server that is close (in IP terms) # to the machine. Add other servers as required. - # Unless you un-comment the line below ntpd will sync -@@ -9,8 +22,26 @@ +-# Unless you un-comment the line below ntpd will sync +-# only against the local system clock. # # server time.server.example.com # + -+logfile /var/log/ntp.log -+ +restrict default kod nomodify notrap nopeer noquery +restrict -6 default kod nomodify notrap nopeer noquery +restrict 127.0.0.1 mask 255.255.255.0 +restrict -6 ::1 + +# GPS Serial data reference (NTP0) ++# This sets the GPS 80 milliseconds slower than the PPS. +server 127.127.28.0 +fudge 127.127.28.0 time1 0.080 refid GPS + -- cgit v1.2.3