plugin_bootloader: fix for multiple parameters on command line
Related: rhbz#1148711 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
05a17e4abe
commit
8fc93e7453
2 changed files with 3 additions and 4 deletions
4
00_tuned
4
00_tuned
|
|
@ -25,6 +25,4 @@ tuned_bootcmdline_file=$tunedcfgdir/bootcmdline
|
|||
|
||||
. $tuned_bootcmdline_file
|
||||
|
||||
if [ "$TUNED_BOOT_CMDLINE" ]; then
|
||||
echo "set tuned_params=\"$TUNED_BOOT_CMDLINE\""
|
||||
fi
|
||||
echo "set tuned_params=\"$TUNED_BOOT_CMDLINE\""
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ class BootloaderPlugin(base.Plugin):
|
|||
return None
|
||||
|
||||
def _patch_bootcmdline(self, value):
|
||||
return self._cmd.replace_in_file(consts.BOOT_CMDLINE_FILE, r"\b(" + consts.BOOT_CMDLINE_TUNED_VAR + r"\s*=).*$", r"\1" + str(value))
|
||||
return self._cmd.replace_in_file(consts.BOOT_CMDLINE_FILE, r"\b(" + consts.BOOT_CMDLINE_TUNED_VAR + \
|
||||
r"\s*=).*$", r"\1" + "\"" + str(value) + "\"")
|
||||
|
||||
def _remove_grub2_tuning(self):
|
||||
self._patch_bootcmdline("")
|
||||
|
|
|
|||
Loading…
Reference in a new issue