From 326ac64fc9c0fbbec278c1247b2c3b748354d66a Mon Sep 17 00:00:00 2001 From: Pothi Kalimuthu <1254302+pothi@users.noreply.github.com> Date: Wed, 24 Sep 2025 08:15:22 +0530 Subject: [PATCH] Add India specific info; simplify syntax --- scripts/ntp-client-v7.rsc | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/scripts/ntp-client-v7.rsc b/scripts/ntp-client-v7.rsc index eaa5d62..6fd6a0d 100644 --- a/scripts/ntp-client-v7.rsc +++ b/scripts/ntp-client-v7.rsc @@ -2,33 +2,30 @@ # variables # timezone -:local tz -:set tz "+05:30" +:local tz "+05:30" # To be used as the primary NTP server -:local ipNTP -:local ipNTPcomment # IP based NTP server - when DNS is unavailable. -:set ipNTP "128.138.140.44" -:set ipNTPcomment "From https://tf.nist.gov/tf-cgi/servers.cgi" +:local ipMainNTP "14.139.60.103" +:local ipMainNTPcomment "time.nplindia.in" # To be used as the secondary NTP server :local poolNTPorg :set poolNTPorg [:resolve pool.ntp.org] # To be used for DNS based NTP servers -:local ntp1 -:local ntp2 -:set ntp1 "time.cloudflare.com" -:set ntp2 "time.google.com" +:local ntp1 "time.nplindia.com" +:local ntp2 "time.cloudflare.com" +:local ntp3 "time.google.com" -:put "Primary NTP: $ipNTP ($ipNTPcomment)" +:put "Primary NTP: $ipMainNTP ($ipMainNTPcomment)" :put "Secondary NTP: $poolNTPorg (pool.ntp.org)" :put "DNS NTP 1: $ntp1" :put "DNS NTP 2: $ntp2" +:put "DNS NTP 3: $ntp3" # configure timezone -# /system clock manual set time-zone=$tz +/system clock manual set time-zone=$tz :put "Timezone: $tz\n" :put "Clock info..." @@ -46,10 +43,11 @@ if ( $rosVersion = 7 ) do={ /system ntp client servers - add address=128.138.140.44 comment="NIST.gov" + add address=$ipMainNTP comment=$ipMainNTPcomment add address=[ :resolve pool.ntp.org ] comment="pool.ntp.org" - add address=time.google.com - add address=time.cloudflare.com + add address=$ntp1 + add address=$ntp2 + add address=$ntp3 } /system ntp client set enabled=yes