public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Jon Murphy <jcmurphy26@gmail.com>
To: development@lists.ipfire.org
Subject: Re: [PATCH] Ship NTP changes
Date: Thu, 26 May 2022 19:45:22 -0500	[thread overview]
Message-ID: <936D4A53-07EB-436A-A1F7-0D42DAA819F8@gmail.com> (raw)
In-Reply-To: <20220527004031.1737133-1-jon.murphy@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 2445 bytes --]

Hello,

The change I made to the initscript ntp file does not seem very elegant!  But I was not sure of a better way too complete the same results.  

> +		echo -e "server	${NTP_ADDR_1} prefer\nserver	${NTP_ADDR_2}" > /etc/ntp/ntpInclude.conf

Is this OK or does it belong in a different section of code.  It needs to be updated when the NTP Servers are changed or when the time.cgi (Time Server) page is updated.

-and-

Is chrony going to replace NTP?  If so, then the change below is not needed.


Please don't hurt me!

Jon


> On May 26, 2022, at 7:40 PM, Jon Murphy <jon.murphy(a)ipfire.org> 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 > 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 available.
>    - 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 <jon.murphy(a)ipfire.org>
> ---
> 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
> 		;;
> -- 
> 2.30.2
> 


  reply	other threads:[~2022-05-27  0:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  0:40 Jon Murphy
2022-05-27  0:45 ` Jon Murphy [this message]
2022-05-30 19:07   ` Peter Müller
     [not found] <0DAE83CC-29C1-40D5-869A-8DFECB275C2E@gmail.com>
2022-06-01  9:43 ` Michael Tremer
2022-06-20  2:47   ` Jon Murphy
2022-06-20  9:55     ` Peter Müller
     [not found] <0C86EDE4-C200-4917-B65A-E57D642A0B5B@gmail.com>
2022-06-20 21:48 ` Peter Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=936D4A53-07EB-436A-A1F7-0D42DAA819F8@gmail.com \
    --to=jcmurphy26@gmail.com \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox