mkimage-profiles/features.in/grub/cfg.in/00defaults.cfg
Anton Midyukov 8f01688b34 grub: Fix selection of default item
1. Didn't work before because the variable was not exported.
2. Fixed the logic broken by the introduction of support for saving
the selected item on the FAT partition.
2021-05-21 00:03:59 +07:00

25 lines
651 B
INI

insmod echo
insmod gzio
insmod minicmd
insmod normal
insmod test
set timeout=@timeout@
if [ "$grub_platform" = "efi" ]; then set EFI_BOOTARGS='@efi_bootargs@'; fi
if [ "$grub_platform" = "efi" -a "$grub_cpu" = "x86_64" ]; then
set linux_suffix='efi'
fi
if [ "$grub_platform" = "pc" ]; then set linux_suffix='16'; fi
if [ ! "$lang" ]; then lang=@LOCALE@; fi
if [ -s $pfxfat/grubenv ]; then
load_env --file $pfxfat/grubenv
set default="${saved_entry}"
else
set default=@default_id@
fi
function savedefault {
if [ -z "${boot_once}" -a -s $pfxfat/grubenv ]; then
saved_entry="${chosen}"
save_env --file $pfxfat/grubenv saved_entry
fi
}