Fix GRUB2 update using post-install hook (#1770)

* Use shell functions for install hooks

* Use post-install hook to initialize GRUB2 bootloader env

Unfortunately the boot name to be updated (RAUC_SLOT_BOOTNAME) is not
available when updating the "boot" slot. Instead, initialize the boot
slot in a kernel post-install slot.
This commit is contained in:
Stefan Agner
2022-02-28 16:49:34 +01:00
committed by GitHub
parent 22f5a83dcc
commit fc0f1e20d5
2 changed files with 82 additions and 67 deletions

View File

@@ -38,6 +38,9 @@ function create_ota_update() {
echo "hooks=install"
echo "[image.kernel]"
echo "filename=kernel.img"
if [ "${BOOTLOADER}" == "grub" ]; then
echo "hooks=post-install"
fi
echo "[image.rootfs]"
echo "filename=rootfs.img"
) > "${rauc_folder}/manifest.raucm"