From f23ff066327c3212faee6bed2c6f8d2a43c9db5f Mon Sep 17 00:00:00 2001 From: Jan Zerdik Date: Mon, 7 Mar 2022 12:21:59 +0100 Subject: [PATCH] Do not hardcode disk name in tuned initrd path. Cleaner solution by jskarvad@redhat.com Resolves: rhbz#2050246 Signed-off-by: Jan Zerdik --- tuned/plugins/plugin_bootloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuned/plugins/plugin_bootloader.py b/tuned/plugins/plugin_bootloader.py index 32dd35d..ad2d4d5 100644 --- a/tuned/plugins/plugin_bootloader.py +++ b/tuned/plugins/plugin_bootloader.py @@ -395,7 +395,7 @@ class BootloaderPlugin(base.Plugin): initrd_grubpath = "/" lc = len(curr_cmdline) if lc: - path = re.sub(r"^\s*BOOT_IMAGE=\s*(\S*/).*$", "\\1", curr_cmdline) + path = re.sub(r"^\s*BOOT_IMAGE=\s*(?:\([^)]*\))?(\S*/).*$", "\\1", curr_cmdline) if len(path) < lc: initrd_grubpath = path self._initrd_val = os.path.join(initrd_grubpath, img_name) -- 2.35.3