aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/boot.py (renamed from sos/plugins/bootloader.py)18
-rw-r--r--sos/plugins/initrd.py30
2 files changed, 15 insertions, 33 deletions
diff --git a/sos/plugins/bootloader.py b/sos/plugins/boot.py
index 8e5f50b3..6e62eac6 100644
--- a/sos/plugins/bootloader.py
+++ b/sos/plugins/boot.py
@@ -12,13 +12,18 @@
## 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, UbuntuPlugin
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+from glob import glob
-class Bootloader(Plugin, RedHatPlugin, UbuntuPlugin):
+class Boot(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
"""Bootloader information
"""
- plugin_name = 'bootloader'
+ plugin_name = 'boot'
+
+ option_list = [("all-images",
+ "collect a file listing for all initramfs images", "slow",
+ False)]
def setup(self):
self.add_copy_specs([
@@ -29,3 +34,10 @@ class Bootloader(Plugin, RedHatPlugin, UbuntuPlugin):
"/boot/yaboot.conf"
])
self.add_cmd_output("ls -lanR /boot")
+ self.add_cmd_output("lsinitrd")
+ if self.get_option("all-images"):
+ for image in glob('/boot/initr*.img'):
+ if image[-9:] == "kdump.img":
+ continue
+ self.add_cmd_output("lsinitrd %s" % image)
+
diff --git a/sos/plugins/initrd.py b/sos/plugins/initrd.py
deleted file mode 100644
index db40999c..00000000
--- a/sos/plugins/initrd.py
+++ /dev/null
@@ -1,30 +0,0 @@
-### This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-
-## You should have received a copy of the GNU General Public License
-## 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, DebianPlugin, UbuntuPlugin
-from glob import glob
-
-class Initrd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
- """initrd related information
- """
-
- plugin_name = 'initrd'
-
- def setup(self):
- for initrd in glob('/boot/initrd-*.img'):
- self.add_cmd_output("zcat "+initrd+" | cpio "+
- "--extract --to-stdout init" )
-
- def default_enabled(self):
- return False