aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Bouchard <louis.bouchard@canonical.com>2013-04-04 14:06:43 +0200
committerLouis Bouchard <louis.bouchard@canonical.com>2013-04-05 12:22:20 +0200
commitcda06da43145bbdcb3e5603c230fb67867044a9c (patch)
treea1c22a985e8a74f2eae24c271a37e5e13ace742e
parentf4084bab912b41065270301c7305e65df9ddb73c (diff)
downloadsos-cda06da43145bbdcb3e5603c230fb67867044a9c.tar.gz
Enabled new Debian plugins & adapted to new format
-rw-r--r--sos/plugins/mysql.py28
1 files changed, 26 insertions, 2 deletions
diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py
index 1437c162..205b7af2 100644
--- a/sos/plugins/mysql.py
+++ b/sos/plugins/mysql.py
@@ -12,19 +12,43 @@
## 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 mysql(Plugin, RedHatPlugin):
+class Mysql(Plugin):
"""MySQL related information
"""
+ plugin_name = "mysql"
+
+ def setup(self):
+ super(mysql, self).setup()
+
+class RedHatMysql(Mysql, RedHatPlugin):
+ """MySQL related information for RedHat based distributions
+ """
+
files = ('/etc/my.cnf',)
packages = ('mysql-server', 'mysql')
def setup(self):
self.add_copy_specs([
+ super(RedHatMysql, self).setup()
"/etc/my.cnf",
"/etc/sysconfig/network",
"/etc/ld.so.conf.d/mysql*",
"/var/log/mysql*"])
+
+class DebianMysql(mysql, DebianPlugin, UbuntuPlugin):
+ """MySQL related information for Debian based distributions
+ """
+
+ files = ('/etc/mysql/my.cnf',)
+ packages = ('mysql-server', 'mysql-common')
+
+ def setup(self):
+ super(DebianMysql, self).setup()
+ self.addCopySpecs([
+ "/etc/mysql/my.cnf",
+ "/etc/mysql/conf.d/mysql*",
+ "/var/log/mysql*"])