]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Ship NTP changes
authorJon Murphy <jon.murphy@ipfire.org>
Fri, 27 May 2022 00:40:31 +0000 (19:40 -0500)
committerPeter Müller <peter.mueller@ipfire.org>
Mon, 20 Jun 2022 20:43:34 +0000 (20:43 +0000)
- 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@ipfire.org>
config/ntp/ntp.conf
src/initscripts/system/ntp

index 9e393ca8edfa4c6c4f7f90ba50d2f1f5978df8a7..bcaf2ee9ecf55892d72324c5bdc7446945395d30 100644 (file)
@@ -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
index 74b8bc86ad2e0a2b43abd59a77b6df5f10e545c7..6c8174d25d9dd1a5cbe785bbab6c2887a7040503 100644 (file)
@@ -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
                ;;