mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-20 17:22:53 +00:00
oem-factory-reset: Parse BLS format grub files
The same grub parsing logic used in kexec-select-boot should be used here as well, so copy it over. Test: oem-factory-reset succeeds with Fedora 32 installed. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
fbbdf67c57
commit
009c10465a
@ -201,6 +201,14 @@ set_default_boot_option()
|
||||
for i in `find /boot -name "grub.cfg"`; do
|
||||
kexec-parse-boot "/boot" "$i" >> $option_file
|
||||
done
|
||||
# FC29/30+ may use BLS format grub config files
|
||||
# https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault
|
||||
# only parse these if $option_file is still empty
|
||||
if [ ! -s $option_file ] && [ -d "/boot/loader/entries" ]; then
|
||||
for i in `find /boot -name "grub.cfg"`; do
|
||||
kexec-parse-bls "/boot" "$i" "/boot/loader/entries" >> $option_file
|
||||
done
|
||||
fi
|
||||
[ ! -r $option_file ] \
|
||||
&& whiptail_error_die "Failed to parse any boot options"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user