mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
diagnostics: Use new component based API for all diagnostic tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
1f14c42af5
commit
2ebb565c92
43 files changed
+334
-616
No files matched your search
@@ -63,6 +63,12 @@ class DateTimeApp(app_module.App):
|
||||
daemon = Daemon('daemon-datetime', managed_services[0])
|
||||
self.add(daemon)
|
||||
|
||||
def diagnose(self):
|
||||
"""Run diagnostics and return the results."""
|
||||
results = super().diagnose()
|
||||
results.append(_diagnose_time_synchronized())
|
||||
return results
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the date/time module."""
|
||||
@@ -77,14 +83,6 @@ def setup(helper, old_version=None):
|
||||
helper.call('post', app.enable)
|
||||
|
||||
|
||||
def diagnose():
|
||||
"""Run diagnostics and return the results."""
|
||||
results = []
|
||||
results.append(_diagnose_time_synchronized())
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def _diagnose_time_synchronized():
|
||||
"""Check whether time is synchronized to NTP server."""
|
||||
result = 'failed'
|
||||
|
||||
Reference in new issue
Block a user