diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2016-08-19 11:20:55 +0200 |
---|---|---|
committer | Pavel Moravec <pmoravec@redhat.com> | 2016-08-19 11:20:55 +0200 |
commit | 57fdeaaad3436f374f4a68dbfef686c5dd8b4d5b (patch) | |
tree | 53c63db997501cbd5e926775c75d5ef7600772ba | |
parent | 27f5e7152444df82eb7a560b1ccef78d40f16296 (diff) | |
download | sos-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.py | 11 |
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 |