aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Bouchard <louis.bouchard@canonical.com>2013-04-12 13:55:42 +0200
committerLouis Bouchard <louis.bouchard@canonical.com>2013-04-12 13:55:42 +0200
commit41126f376ff05a261142f0e6dafa57a55e1d954a (patch)
tree9bd907864475aaeaa492db327651098b09ddecec
parentdef1b1d5b7a122a77c7b7f2f7f939d0517ce88fc (diff)
downloadsos-41126f376ff05a261142f0e6dafa57a55e1d954a.tar.gz
Enabled plugin for Ubuntu/Debian
-rw-r--r--sos/plugins/ntp.py26
1 files changed, 23 insertions, 3 deletions
diff --git a/sos/plugins/ntp.py b/sos/plugins/ntp.py
index c87a61b1..ebbd6eb1 100644
--- a/sos/plugins/ntp.py
+++ b/sos/plugins/ntp.py
@@ -12,14 +12,34 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-from sos.plugins import Plugin, RedHatPlugin
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
-class ntp(Plugin, RedHatPlugin):
+class Ntp(Plugin):
"""NTP related information
"""
+ plugin_name = "ntp"
+
packages = ('ntp',)
def setup(self):
- self.add_cmd_output("/usr/bin/ntpstat")
+ super(Ntp, self).setup()
self.add_cmd_output("/usr/sbin/ntptime")
+
+class RedHatNtp(Ntp, RedHatPlugin):
+ """NTP related information for RedHat based distributions
+ """
+
+ def setup(self):
+ super(RedHatNtp, self).setup()
+ self.add_cmd_output("/usr/bin/ntpstat")
+
+class DebianNtp(Ntp, DebianPlugin, UbuntuPlugin):
+ """NTP related information for Debian based distributions
+ """
+
+ def setup(self):
+ super(DebianNtp, self).setup()
+ self.add_copy_spec('/etc/default/ntp')
+
+