Copy freestanding initrds in image mode

Copy freestand initrd files when cbm is run in image mode. Note the
initrd installation call happens prior to kernel install. This is done
as failure to install/update an initrd is fatal and if kernel install
happens before initrd install then an installed kernel could exist
with a configuration file referencing initrds that won't be available.
This commit is contained in:
William Douglas
2018-05-15 09:55:02 -07:00
committed by William Douglas
parent 3ffaf5a658
commit da87cb5ff5
+5
View File
@@ -201,6 +201,11 @@ static bool boot_manager_update_image(BootManager *self)
}
LOG_SUCCESS("update_image: Bootloader update successful");
if (!boot_manager_copy_initrd_freestanding(self)) {
LOG_ERROR("Failed to copying freestanding initrd");
return false;
}
/* Go ahead and install the kernels */
for (uint16_t i = 0; i < kernels->len; i++) {
const Kernel *k = nc_array_get(kernels, i);