mirror of
https://github.com/clearlinux/clr-boot-manager.git
synced 2026-10-03 23:38:21 +00:00
Do freestanding initrd update before kernel update
To align with image mode update (and for the same reasons) move the freestanding initrd update to before the kernel update. This prevents creating an invalid kernel bootloader entry if there was a problem with installing a freestanding initrd.
This commit is contained in:
committed by
William Douglas
parent
3a8a7ee243
commit
2aba4168f8
@@ -293,6 +293,11 @@ static bool boot_manager_update_native(BootManager *self)
|
||||
|
||||
LOG_SUCCESS("update_native: Bootloader updated");
|
||||
|
||||
if (!boot_manager_copy_initrd_freestanding(self)) {
|
||||
LOG_ERROR("Failed to copying freestanding initrd");
|
||||
return false;
|
||||
}
|
||||
|
||||
/* This is mostly to allow a repair-situation */
|
||||
if (running) {
|
||||
/* Not necessarily fatal. */
|
||||
@@ -304,11 +309,6 @@ static bool boot_manager_update_native(BootManager *self)
|
||||
}
|
||||
}
|
||||
|
||||
if (!boot_manager_copy_initrd_freestanding(self)) {
|
||||
LOG_ERROR("Failed to copying freestanding initrd");
|
||||
return false;
|
||||
}
|
||||
|
||||
nc_hashmap_iter_init(mapped_kernels, &map_iter);
|
||||
while (nc_hashmap_iter_next(&map_iter, (void **)&kernel_type, (void **)&typed_kernels)) {
|
||||
Kernel *tip = NULL;
|
||||
|
||||
Reference in New Issue
Block a user