aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Bouchard <louis.bouchard@canonical.com>2013-04-15 15:47:24 +0200
committerLouis Bouchard <louis.bouchard@canonical.com>2013-04-15 15:47:24 +0200
commit271a918888d78bbb229fa55558510e3b32ca03dd (patch)
tree5822aff8cbc5d2962a4c81ca134f848b581d72f3
parent2063ef801ac9d3050d1053a33801366fbe39f76a (diff)
downloadsos-271a918888d78bbb229fa55558510e3b32ca03dd.tar.gz
Enabled plugin for Ubuntu/Debian
-rw-r--r--sos/plugins/startup.py30
1 files changed, 26 insertions, 4 deletions
diff --git a/sos/plugins/startup.py b/sos/plugins/startup.py
index 70f8966a..06c72f3c 100644
--- a/sos/plugins/startup.py
+++ b/sos/plugins/startup.py
@@ -12,17 +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
-class startup(Plugin, RedHatPlugin):
+class Startup(Plugin):
"""startup information
"""
+ plugin_name = "startup"
+
option_list = [("servicestatus", "get a status of all running services", "slow", False)]
def setup(self):
- self.add_copy_spec("/etc/rc.d")
- self.add_cmd_output("/sbin/chkconfig --list", root_symlink = "chkconfig")
if self.get_option('servicestatus'):
self.add_cmd_output("/sbin/service --status-all")
self.add_cmd_output("/sbin/runlevel")
+
+class RedHatStartup(Startup, RedHatPlugin):
+ """startup information for RedHat based distributions
+ """
+
+ def setup(self):
+ super(RedHatStartup, self).setup()
+ self.add_copy_spec("/etc/rc.d")
+
+ self.add_cmd_output("/sbin/chkconfig --list", root_symlink = "chkconfig")
+
+class DebianStartup(Startup, DebianPlugin, UbuntuPlugin):
+ """startup information
+ """
+
+ def setup(self):
+ super(DebianStartup, self).setup()
+ self.add_copy_spec("/etc/rc*.d")
+
+ self.add_cmd_output("/sbin/initctl show-config", root_symlink = "initctl")
+ if self.get_option('servicestatus'):
+ self.add_cmd_output("/sbin/initctl list")