stages/grub2: fix auto bool to platform conversion

In the case that legacy is of type bool it is automatically converted
to the platform string ("i386-legacy"). This is mainly done to keep
backwards comparability as it was just a boolean before. But the auto
conversion did not take the actual *value* of the boolean into account
meaning "legacy: False" would be turned into "legacy: i386-pc" and
thus effectively changing the value from False to True.
This commit is contained in:
Christian Kellner 2020-01-09 15:45:20 +01:00 committed by Lars Karlitski
parent 3a73d589d2
commit 42a4176a9f

View file

@ -117,7 +117,7 @@ def main(tree, options):
uefi = options.get("uefi", None)
# legacy boolean means the
if isinstance(legacy, bool):
if isinstance(legacy, bool) and legacy:
legacy = "i386-pc"
# Create the configuration file that determines how grub.cfg is generated.