From 16f0fed775da29506b5f6197e4a2644cd9ded84b Mon Sep 17 00:00:00 2001 From: Nick Niehoff Date: Thu, 10 Jan 2019 14:34:22 -0700 Subject: [chrony] Adding support for Debian and Ubuntu Chrony is also supported on Debian and Ubuntu, but is configured slightly differently. Resolves: #1536 Signed-off-by: Nick Niehoff Signed-off-by: Bryn M. Reeves --- sos/plugins/chrony.py | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/sos/plugins/chrony.py b/sos/plugins/chrony.py index 8d115f97..8eafcfd9 100644 --- a/sos/plugins/chrony.py +++ b/sos/plugins/chrony.py @@ -6,10 +6,10 @@ # # See the LICENSE file in the source distribution for further information. -from sos.plugins import Plugin, RedHatPlugin +from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin -class Chrony(Plugin, RedHatPlugin): +class Chrony(Plugin): """Chrony clock (for Network time protocol) """ @@ -19,10 +19,6 @@ class Chrony(Plugin, RedHatPlugin): packages = ('chrony',) def setup(self): - self.add_copy_spec([ - "/etc/chrony.conf", - "/var/lib/chrony/drift" - ]) self.add_cmd_output([ "chronyc activity", "chronyc tracking", @@ -32,6 +28,26 @@ class Chrony(Plugin, RedHatPlugin): "chronyc ntpdata", "chronyc -n clients" ]) + + +class RedHatChrony(Chrony, RedHatPlugin): + def setup(self): + super(RedHatChrony, self).setup() + self.add_copy_spec([ + "/etc/chrony.conf", + "/var/lib/chrony/drift" + ]) self.add_journal(units="chronyd") + +class DebianChrony(Chrony, DebianPlugin, UbuntuPlugin): + def setup(self): + super(DebianChrony, self).setup() + self.add_copy_spec([ + "/etc/chrony/chrony.conf", + "/var/lib/chrony/chrony.drift", + "/etc/default/chrony" + ]) + self.add_journal(units="chrony") + # vim: et ts=4 sw=4 -- cgit