]> git.ozlabs.org Git - petitboot/commitdiff
discover/grub2: Allow unset and invalid defaults
authorJeremy Kerr <jk@ozlabs.org>
Thu, 11 Dec 2014 01:42:58 +0000 (09:42 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 11 Dec 2014 07:11:42 +0000 (15:11 +0800)
If the default environment variable is unset or invalid (i.e.,
references a non-existent boot option), then GRUB2 will fallback to the
first boot option present. This is preventing petitboot from autobooting
where no default is explicitly set, or is stale.

This change adds this fallback behaviour to petitboot. Because we don't
know if the first option will be a default at parse time (as no other
options matched the default env var), we need to keep options in a list,
and register them with the discover server once the parse is complete.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

No differences found