From 7c2bf157491dab06d7e6437a92c74aedf2ae4535 Mon Sep 17 00:00:00 2001 From: Gerald Elder-Vass <47088217+GeraldEV@users.noreply.github.com> Date: Mon, 18 Mar 2024 09:54:13 +0000 Subject: [PATCH] Improved comments for chronyd one-shot update Co-authored-by: Bernhard Kaindl --- XSConsoleData.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/XSConsoleData.py b/XSConsoleData.py index 6eb6ad4..f0f886c 100644 --- a/XSConsoleData.py +++ b/XSConsoleData.py @@ -569,8 +569,10 @@ def SaveToNTPConf(self): if servers: self.StopService("chronyd") - getoutput("chronyd -q 'server %s iburst'" % servers[0]) # Update the clock and exit - getoutput("hwclock -w") # Sync hwclock with date set by chronyd + # Single shot time update like: `ntpdate servers[0]` + getoutput("chronyd -q 'server %s iburst'" % servers[0]) + # Write the system time (set by the single shot NTP) to the HW clock + getoutput("hwclock -w") self.StartService("chronyd") def AddDHCPNTP(self):