Skip to content

Commit

Permalink
Remove NTPStatus and the testing hook
Browse files Browse the repository at this point in the history
ntpstat is no longer present by default on installations
  • Loading branch information
Gerald Elder-Vass committed Mar 13, 2024
1 parent a992e30 commit 003ece8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions XSConsoleData.py
Original file line number Diff line number Diff line change
Expand Up @@ -1229,10 +1229,6 @@ def StopService(self, service):
if status != 0:
raise Exception(output)

def NTPStatus(self):
status, output = getstatusoutput("/usr/bin/ntpstat")
return output

def SetVerboseBoot(self, inVerbose):
if inVerbose:
name = 'noisy'
Expand Down
8 changes: 0 additions & 8 deletions plugins-base/XSFeatureNTP.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ def CreateINITIALPane(self):
if usingDHCP:
choiceDefs.insert(0, ChoiceDef(Lang("Use DHCP NTP Servers"), lambda: self.HandleInitialChoice('DHCP')))

if Auth.Inst().IsTestMode():
# Show Status is a testing-only function
choiceDefs.append(ChoiceDef(Lang("Show Status (ntpstat)"), lambda: self.HandleInitialChoice('STATUS') ))

self.initialMenu = Menu(self, None, Lang("Configure Network Time"), choiceDefs)

def CreateMANUALPane(self):
Expand Down Expand Up @@ -165,10 +161,6 @@ def HandleInitialChoice(self, inChoice):
elif inChoice == "NONE":
self.ChangeState("NONE")

elif inChoice == "STATUS":
message = data.NTPStatus()+Lang("\n\n(Initial synchronization may take several minutes)")
Layout.Inst().PushDialogue( Lang("NTP Status"), message))

except Exception as e:
Layout.Inst().PushDialogue(InfoDialogue( Lang("Operation Failed"), Lang(e)))

Expand Down

0 comments on commit 003ece8

Please sign in to comment.