nixos/systemd-boot-builder: write loader.conf after the entries it points at
A crash between the two would leave `default <id>` referring to a .conf that does not exist yet.
This commit is contained in:
@@ -540,8 +540,6 @@ def install_bootloader(args: argparse.Namespace) -> None:
|
||||
if is_default:
|
||||
default_entry_id = new_bootctl_id
|
||||
|
||||
write_loader_conf(default_entry_id)
|
||||
|
||||
# Garbage-collect stale kernels/initrds/entries before re-populating extra
|
||||
# files, so that user-supplied extraEntries (which may also live under
|
||||
# loader/entries and start with `nixos-`) are not removed again.
|
||||
@@ -549,6 +547,8 @@ def install_bootloader(args: argparse.Namespace) -> None:
|
||||
|
||||
write_boot_files(boot_files)
|
||||
|
||||
write_loader_conf(default_entry_id)
|
||||
|
||||
remove_extra_files()
|
||||
run([COPY_EXTRA_FILES])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user