aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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")