grubcfg: Quote the GRUB_DISTRIBUTOR value.
This commit is contained in:
parent
76450b44a3
commit
cde7356f0d
@ -56,7 +56,7 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
||||
elif lines[i].startswith("GRUB_CMDLINE_LINUX_DEFAULT"):
|
||||
lines[i] = kernel_cmd
|
||||
elif lines[i].startswith("#GRUB_DISTRIBUTOR") or lines[i].startswith("GRUB_DISTRIBUTOR"):
|
||||
lines[i] = "GRUB_DISTRIBUTOR=%s" % distributor
|
||||
lines[i] = "GRUB_DISTRIBUTOR='%s'" % distributor.replace("'", "'\\''")
|
||||
|
||||
with open(default_grub, 'w') as grub_file:
|
||||
grub_file.write("\n".join(lines) + "\n")
|
||||
|
Loading…
Reference in New Issue
Block a user