summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-09 17:01:44 +0200
committerGitHub <noreply@github.com>2024-06-09 17:01:44 +0200
commit723e2ab61480991ddd0892ab627fb7035c7e256d (patch)
treeb381d894d9a646a5443ce9a96b850f2ba1c06970 /python
parent23d02fae78b05ee3cf08bb8e8023d6c4c339789e (diff)
parent5793af2132e9f901cdc6a95da6fd7a5e4fb11087 (diff)
downloadvyos-1x-723e2ab61480991ddd0892ab627fb7035c7e256d.tar.gz
vyos-1x-723e2ab61480991ddd0892ab627fb7035c7e256d.zip
Merge pull request #3604 from vyos/mergify/bp/sagitta/pr-3592
grub: T6453: Fixed GRUB variables parsing (backport #3592)
Diffstat (limited to 'python')
-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 0d9c1340b..6f3bbdaf6 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>[^$]+)"$'