mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 03:15:44 -05:00
Fix up regex in grubcfg to work with single quotes.
This commit is contained in:
parent
debd4bc352
commit
8625b8c5a9
1 changed files with 3 additions and 1 deletions
|
@ -77,12 +77,14 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||
lines[i] = kernel_cmd
|
||||
have_kernel_cmd = True
|
||||
elif lines[i].startswith("GRUB_CMDLINE_LINUX_DEFAULT"):
|
||||
regex = re.compile(r"^GRUB_CMDLINE_LINUX_DEFAULT\s*=\s*\"")
|
||||
regex = re.compile(r"^GRUB_CMDLINE_LINUX_DEFAULT\s*=\s*")
|
||||
line = regex.sub("", lines[i])
|
||||
line = line.lstrip()
|
||||
line = line.lstrip("\"")
|
||||
line = line.lstrip("'")
|
||||
line = line.rstrip()
|
||||
line = line.rstrip("\"")
|
||||
line = line.rstrip("'")
|
||||
existing_params = line.split()
|
||||
|
||||
for existing_param in existing_params:
|
||||
|
|
Loading…
Add table
Reference in a new issue