mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[grubcfg] If we only see #GRUB_DISTRIBUTION, it's not been set
- If we update the line, then GRUB_DISTRIBUTION has been set - If we don't update the line (e.g. because of *keepDistribution*) then a comment doesn't count as "have seen that line". This means that if we get to the end of the file, with only commented- out GRUB_DISTRIBUTION lines, and *keepDistribution* is set, then we'll still write a distribution line -- because otherwise it's not set at all.
This commit is contained in:
parent
c6c861654d
commit
4a0a8083f3
1 changed files with 5 additions and 1 deletions
|
@ -180,7 +180,11 @@ def modify_grub_default(partitions, root_mount_point, distributor):
|
|||
or lines[i].startswith("GRUB_DISTRIBUTOR")):
|
||||
if libcalamares.job.configuration.get("keepDistributor", false):
|
||||
lines[i] = distributor_line
|
||||
have_distributor_line = True
|
||||
have_distributor_line = True
|
||||
else:
|
||||
# We're not updating because of *keepDistributor*, but if
|
||||
# this was a comment line, then it's still not been set.
|
||||
have_distributor_line = not lines[i].startsdwith("#")
|
||||
else:
|
||||
lines = []
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue