From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: Re: [PATCH] Ship NTP changes Date: Mon, 30 May 2022 19:07:40 +0000 Message-ID: <37d111ca-3bb9-1bb4-495b-589fba7df168@ipfire.org> In-Reply-To: <936D4A53-07EB-436A-A1F7-0D42DAA819F8@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3375522310047393031==" List-Id: --===============3375522310047393031== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Jon, thank you for submitting this. I consent with the intention of your patch, and believe this is the cure (or = at least a medicine) to insanely high clock drifts on some IPFire installations. Based= on the forum activity, there used to be more of them, but my gut feeling is that thi= s issue never completely went away. Nevertheless, I would like to await Arne's feedback on this: Particularly on = ARM systems without a battery-backed RTC, IPFire comes up with a bogus time, and I am not= sure what the implications of this patch would be for such systems. > Hello, >=20 > The change I made to the initscript ntp file does not seem very elegant! B= ut I was not sure of a better way too complete the same results. =20 >=20 >> + echo -e "server ${NTP_ADDR_1} prefer\nserver ${NTP_ADDR_2}" > /etc/ntp/= ntpInclude.conf >=20 > Is this OK or does it belong in a different section of code. It needs to b= e updated when the NTP Servers are changed or when the time.cgi (Time Server)= page is updated. Hmm, I would favour a better solution as well. That file might be populated, = and just overwriting it seems to be a bit brutal to me. :-) > -and- >=20 > Is chrony going to replace NTP? If so, then the change below is not needed. I would really like so, but don't see that happen in IPFire 2.x soon. For the= medium term at least, you patch is by no means obsolete. > Please don't hurt me! Hope I did not. :-) Thanks, and best regards, Peter M=C3=BCller >=20 > Jon >=20 >=20 >> On May 26, 2022, at 7:40 PM, Jon Murphy wrote: >> >> - Device time more accurate. (e.g., +/- 10 seconds per day to < 100 ms on= some devices) >> ( I know we don't need the perfect time server ) >> - NTP and time will be accurate in manual mode (setting on Time Server > N= TP 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 avail= able. >> - Change the "prefer" server from 127.127.1.0 to the Primary NTP server= specified on >> the Time Server > NTP Configuration WebGUI page. >> - Change allows the drift file (located at /etc/ntp/drift) to be populated= by ntpd. >> - The drift file is updated about once per hour which helps correct the= device 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 >> >> + echo -e "server ${NTP_ADDR_1} prefer\nserver ${NTP_ADDR_2}" > /etc/ntp/= ntpInclude.conf >> + >> boot_mesg "Starting ntpd..." >> loadproc /usr/bin/ntpd -Ap /var/run/ntpd.pid >> ;; >> --=20 >> 2.30.2 >> >=20 --===============3375522310047393031==--