fix(boot): keep the one-shot entry as default when the menu is forced

This commit is contained in:
alex authored and Alex Zenla committed 2026-10-04 17:53:13 -07:00
1 parent 7c4b2e87b0
commit 5f81a99d21
1 file changed
+3 -2
+3 -2
View File
@@ -506,8 +506,9 @@ fn run(reboot_on_error: &mut bool) -> Result<()> {
// The preferred entry sources never use an entry with no boot counter tries left. // The preferred entry sources never use an entry with no boot counter tries left.
// Each source has whether it matches by id, and whether it skips bad entries. // Each source has whether it matches by id, and whether it skips bad entries.
// In strict mode, the one-shot entry is the default entry for this boot, like in // In strict mode, the one-shot entry is the default entry for this boot, like in
// systemd-boot, and the menu or its timeout still decides what is booted. // systemd-boot, and the menu or its timeout still decides what is booted. This also holds
let oneshot_source = if strict { // when the menu is forced, as the one-shot entry is then not booted at once.
let oneshot_source = if strict || force_boot_menu {
bootloader_interface_oneshot_entry.clone() bootloader_interface_oneshot_entry.clone()
} else { } else {
None None