aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2016-08-19 11:20:55 +0200
committerPavel Moravec <pmoravec@redhat.com>2016-08-19 11:20:55 +0200
commit57fdeaaad3436f374f4a68dbfef686c5dd8b4d5b (patch)
tree53c63db997501cbd5e926775c75d5ef7600772ba
parent27f5e7152444df82eb7a560b1ccef78d40f16296 (diff)
downloadsos-57fdeaaad3436f374f4a68dbfef686c5dd8b4d5b.tar.gz
[grub2] grub2-mkconfig loads ext4 and brctl kernel modules
Call grub2-mkconfig with GRUB_DISABLE_OS_PROBER=true to prevent explicit loading of the kernel modules. Resolves: #822 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/grub2.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/sos/plugins/grub2.py b/sos/plugins/grub2.py
index d3214946..a98d3d0f 100644
--- a/sos/plugins/grub2.py
+++ b/sos/plugins/grub2.py
@@ -33,10 +33,13 @@ class Grub2(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
"/etc/grub2.cfg",
"/etc/grub.d"
])
- self.add_cmd_output([
- "ls -lanR /boot",
- "grub2-mkconfig"
- ])
+
+ self.add_cmd_output("ls -lanR /boot")
+ # call grub2-mkconfig with GRUB_DISABLE_OS_PROBER=true to prevent
+ # possible unwanted loading of some kernel modules
+ env = {}
+ env['GRUB_DISABLE_OS_PROBER'] = 'true'
+ self.add_cmd_output("grub2-mkconfig", env=env)
def postproc(self):
# the trailing space is required; python treats '_' as whitespace