Fix rauc hook to save and restore the grub environment (#3451)

Without a machine-id, the next boot will be considered as a
first boot, and any external data disk will be disabled.

Fixes #3247.
This commit is contained in:
Cyprien Laplace 2024-07-04 04:14:47 -04:00 committed by GitHub
parent 245c0d0b03
commit 33d8b538ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,11 +34,13 @@ install_boot() {
else
# Backup boot config
cp -f "${BOOT_MNT}"/*.txt "${BOOT_TMP}/" || true
cp -f "${BOOT_MNT}"/EFI/BOOT/grubenv "${BOOT_TMP}/" || true
cp -rf "${BOOT_NEW}"/* "${BOOT_MNT}/"
# Restore boot config
cp -f "${BOOT_TMP}"/*.txt "${BOOT_MNT}/" || true
cp -f "${BOOT_TMP}"/grubenv "${BOOT_MNT}"/EFI/BOOT/ || true
fi
}