1
0
Fork 0

bootloader: improved regex for /boot location detection

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2017-04-11 16:08:03 +02:00
parent 8442dabf54
commit e8f42a2c3f
No known key found for this signature in database
GPG key ID: D8E1C00E076E840B

View file

@ -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)