bootloader: improved regex for /boot location detection
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
8442dabf54
commit
e8f42a2c3f
1 changed files with 1 additions and 1 deletions
|
|
@ -187,7 +187,7 @@ class BootloaderPlugin(base.Plugin):
|
|||
initrd_grubpath = "/"
|
||||
lc = len(curr_cmdline)
|
||||
if lc:
|
||||
path = re.sub(r"^.*[= \t]+([^= \t]*/)vmlinuz-.*$", "\\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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue