summaryrefslogtreecommitdiff
path: root/python/vyos/system/grub.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-06-07 15:20:57 +0200
committerGitHub <noreply@github.com>2024-06-07 15:20:57 +0200
commita79c094c3b0a543d4dc04adb3fc64e215b910593 (patch)
tree91a57c167895896d259ab8c197cfd355b1743aeb /python/vyos/system/grub.py
parente3a04ea99108a2c4fbe1f95e93621fbf81bf750d (diff)
parentd3acecdf129cd940f8b2d1b229a6e2a343cab74b (diff)
downloadvyos-1x-a79c094c3b0a543d4dc04adb3fc64e215b910593.tar.gz
vyos-1x-a79c094c3b0a543d4dc04adb3fc64e215b910593.zip
Merge pull request #3592 from zdc/T6453-circinus
grub: T6453: Fixed GRUB variables parsing
Diffstat (limited to 'python/vyos/system/grub.py')
-rw-r--r--python/vyos/system/grub.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/system/grub.py b/python/vyos/system/grub.py
index faf68c2d1..daddb799a 100644
--- a/python/vyos/system/grub.py
+++ b/python/vyos/system/grub.py
@@ -49,7 +49,7 @@ TMPL_GRUB_COMMON: str = 'grub/grub_common.j2'
BOOT_OPTS_STEM: str = 'boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/'
# prepare regexes
-REGEX_GRUB_VARS: str = r'^set (?P<variable_name>.+)=[\'"]?(?P<variable_value>.*)(?<![\'"])[\'"]?$'
+REGEX_GRUB_VARS: str = r'^set (?P<variable_name>\w+)=[\'"]?(?P<variable_value>.*)(?<![\'"])[\'"]?$'
REGEX_GRUB_MODULES: str = r'^insmod (?P<module_name>.+)$'
REGEX_KERNEL_CMDLINE: str = r'^BOOT_IMAGE=/(?P<boot_type>boot|live)/((?P<image_version>.+)/)?vmlinuz.*$'
REGEX_GRUB_BOOT_OPTS: str = r'^\s*set boot_opts="(?P<boot_opts>[^$]+)"$'