diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2020-11-20 12:46:36 -0500 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-11-23 10:43:43 -0500 |
commit | 03a233c19113e06b5d9fae5266444d19bcf7a9c0 (patch) | |
tree | c1d8e452cad0530360e4494a40c6ae1bd896004a | |
parent | cb8ad7b2923376c3640bfa1f6aaa0b30e6d5f96d (diff) | |
download | sos-03a233c19113e06b5d9fae5266444d19bcf7a9c0.tar.gz |
[grub2] Stylistic cleanup for grub2-mkconfig calls
Small stylistic cleanups for the `grub2-mkconfig` environment variable
settings and command formatting.
Closes: #1070
Resolves: #2317
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/report/plugins/grub2.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sos/report/plugins/grub2.py b/sos/report/plugins/grub2.py index e16dd118..3baa3274 100644 --- a/sos/report/plugins/grub2.py +++ b/sos/report/plugins/grub2.py @@ -35,13 +35,11 @@ class Grub2(Plugin, IndependentPlugin): # further, check if the command supports --no-grubenv-update option # to prevent removing of extra args in $kernel_opts, and (only) if so, # call the command with this argument - env = {} - env['GRUB_DISABLE_OS_PROBER'] = 'true' grub_cmd = 'grub2-mkconfig' - co = {'cmd': 'grub2-mkconfig --help', 'output': '--no-grubenv-update'} + co = {'cmd': '%s --help' % grub_cmd, 'output': '--no-grubenv-update'} if self.test_predicate(self, pred=SoSPredicate(self, cmd_outputs=co)): grub_cmd += ' --no-grubenv-update' - self.add_cmd_output(grub_cmd, env=env) + self.add_cmd_output(grub_cmd, env={'GRUB_DISABLE_OS_PROBER': 'true'}) def postproc(self): # the trailing space is required; python treats '_' as whitespace |