aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/ntp.py1
-rw-r--r--sos/plugins/postfix.py28
-rw-r--r--sos/plugins/snmp.py24
3 files changed, 45 insertions, 8 deletions
diff --git a/sos/plugins/ntp.py b/sos/plugins/ntp.py
index ebbd6eb1..86fcd115 100644
--- a/sos/plugins/ntp.py
+++ b/sos/plugins/ntp.py
@@ -23,7 +23,6 @@ class Ntp(Plugin):
packages = ('ntp',)
def setup(self):
- super(Ntp, self).setup()
self.add_cmd_output("/usr/sbin/ntptime")
class RedHatNtp(Ntp, RedHatPlugin):
diff --git a/sos/plugins/postfix.py b/sos/plugins/postfix.py
index 0d7a671c..ed8e2fdd 100644
--- a/sos/plugins/postfix.py
+++ b/sos/plugins/postfix.py
@@ -12,19 +12,39 @@
## 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
from os.path import exists
-class postfix(Plugin, RedHatPlugin):
+class Postfix(Plugin):
"""mail server related information
"""
+ plugin_name = "postfix"
- files = ('/etc/rc.d/init.d/postfix',)
packages = ('postfix',)
def setup(self):
self.add_copy_specs([
- "/etc/mail",
"/etc/postfix/main.cf",
"/etc/postfix/master.cf"])
self.add_cmd_output("/usr/sbin/postconf")
+
+class RedHatPostfix(Postfix, RedHatPlugin):
+ """mail server related information for RedHat based distributions
+ """
+
+ files = ('/etc/rc.d/init.d/postfix',)
+ packages = ('postfix',)
+
+ def setup(self):
+ super(RedHatPostfix, self).setup()
+ self.add_copy_spec("/etc/mail")
+
+class DebianPostfix(Postfix, DebianPlugin, UbuntuPlugin):
+ """mail server related information for Debian based Distribution
+ """
+
+ packages = ('postfix',)
+
+ def setup(self):
+ super(DebianPostfix, self).setup()
+ self.add_copy_spec("/etc/postfix/dynamicmaps.cf")
diff --git a/sos/plugins/snmp.py b/sos/plugins/snmp.py
index 63aac8e6..177c0e26 100644
--- a/sos/plugins/snmp.py
+++ b/sos/plugins/snmp.py
@@ -14,15 +14,33 @@
## 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
from os.path import exists
-class snmp(Plugin, RedHatPlugin):
+class Snmp(Plugin):
"""snmp related information
"""
+ plugin_name = "snmp"
files = ('/etc/snmp/snmpd.conf',)
- packages = ('net-snmp',)
def setup(self):
self.add_copy_spec("/etc/snmp")
+
+class RedHatSnmp(Snmp, RedHatPlugin):
+ """snmp related information for RedHat based distributions
+ """
+
+ packages = ('net-snmp',)
+
+ def setup(self):
+ super(RedHatSnmp, self).setup()
+
+class DebianSnmp(Snmp, DebianPlugin, UbuntuPlugin):
+ """snmp related information for Debian based distributions
+ """
+
+ packages = ('snmp',)
+
+ def setup(self):
+ super(DebianSnmp, self).setup()