From 003ece8686a800c6aeb9fead4643082f71f37864 Mon Sep 17 00:00:00 2001 From: Gerald Elder-Vass Date: Thu, 22 Feb 2024 11:54:41 +0000 Subject: [PATCH] Remove NTPStatus and the testing hook ntpstat is no longer present by default on installations --- XSConsoleData.py | 4 ---- plugins-base/XSFeatureNTP.py | 8 -------- 2 files changed, 12 deletions(-) diff --git a/XSConsoleData.py b/XSConsoleData.py index 65c3cdc..205f09f 100644 --- a/XSConsoleData.py +++ b/XSConsoleData.py @@ -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' diff --git a/plugins-base/XSFeatureNTP.py b/plugins-base/XSFeatureNTP.py index 2abf13d..d8b512b 100644 --- a/plugins-base/XSFeatureNTP.py +++ b/plugins-base/XSFeatureNTP.py @@ -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): @@ -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)))