mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-03 04:15:37 -04: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
|
lines[i] = kernel_cmd
|
||||||
have_kernel_cmd = True
|
have_kernel_cmd = True
|
||||||
elif lines[i].startswith("GRUB_CMDLINE_LINUX_DEFAULT"):
|
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 = regex.sub("", lines[i])
|
||||||
line = line.lstrip()
|
line = line.lstrip()
|
||||||
line = line.lstrip("\"")
|
line = line.lstrip("\"")
|
||||||
|
line = line.lstrip("'")
|
||||||
line = line.rstrip()
|
line = line.rstrip()
|
||||||
line = line.rstrip("\"")
|
line = line.rstrip("\"")
|
||||||
|
line = line.rstrip("'")
|
||||||
existing_params = line.split()
|
existing_params = line.split()
|
||||||
|
|
||||||
for existing_param in existing_params:
|
for existing_param in existing_params:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue