From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Murphy To: development@lists.ipfire.org Subject: [PATCH] Ship NTP changes Date: Thu, 26 May 2022 19:40:31 -0500 Message-ID: <20220527004031.1737133-1-jon.murphy@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0388745211738447402==" List-Id: --===============0388745211738447402== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - Device time more accurate. (e.g., +/- 10 seconds per day to < 100 ms on s= ome devices) ( I know we don't need the perfect time server ) - NTP and time will be accurate in manual mode (setting on Time Server > NTP= Configuration WebGUI) - Change NTP "prefer" server: - The current preferred NTP server in an Undisciplined Local Clock. - This is intended when no outside source of synchronized time is availab= le. - Change the "prefer" server from 127.127.1.0 to the Primary NTP server s= pecified on the Time Server > NTP Configuration WebGUI page. - Change allows the drift file (located at /etc/ntp/drift) to be populated b= y ntpd. - The drift file is updated about once per hour which helps correct the d= evice time. Signed-off-by: Jon Murphy --- config/ntp/ntp.conf | 3 ++- src/initscripts/system/ntp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/ntp/ntp.conf b/config/ntp/ntp.conf index 9e393ca8e..bcaf2ee9e 100644 --- a/config/ntp/ntp.conf +++ b/config/ntp/ntp.conf @@ -1,6 +1,7 @@ disable monitor restrict default nomodify noquery restrict 127.0.0.1 -server 127.127.1.0 prefer +server 127.127.1.0 fudge 127.127.1.0 stratum 10 driftfile /etc/ntp/drift +includefile /etc/ntp/ntpInclude.conf diff --git a/src/initscripts/system/ntp b/src/initscripts/system/ntp index 74b8bc86a..6c8174d25 100644 --- a/src/initscripts/system/ntp +++ b/src/initscripts/system/ntp @@ -52,6 +52,8 @@ case "$1" in fi fi =20 + echo -e "server ${NTP_ADDR_1} prefer\nserver ${NTP_ADDR_2}" > /etc/ntp/ntp= Include.conf + boot_mesg "Starting ntpd..." loadproc /usr/bin/ntpd -Ap /var/run/ntpd.pid ;; --=20 2.30.2 --===============0388745211738447402==--