aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Niehoff <nick.niehoff@canonical.com>2019-01-10 14:34:22 -0700
committerBryn M. Reeves <bmr@redhat.com>2019-03-19 18:59:56 +0000
commit16f0fed775da29506b5f6197e4a2644cd9ded84b (patch)
treecbf001e94d03cb24ef9e83f2e1518c10aac2fe41
parent1e0d32c0cce20a698ceb2889d93d3921ecf570f9 (diff)
downloadsos-16f0fed775da29506b5f6197e4a2644cd9ded84b.tar.gz
[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 <nick.niehoff@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/chrony.py28
1 files 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