Skip to content

Commit

Permalink
Improved comments for chronyd one-shot update
Browse files Browse the repository at this point in the history
Co-authored-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
  • Loading branch information
GeraldEV and bernhardkaindl committed Mar 18, 2024
1 parent 5830764 commit 7c2bf15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions XSConsoleData.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7c2bf15

Please sign in to comment.