Don't fail update even if files are missing (#1776)

Don't fail the boot slot update even if files are missing in the current
boot directory.
This commit is contained in:
Stefan Agner 2022-03-02 11:44:56 +01:00 committed by GitHub
parent de21729578
commit cd87324452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,13 +17,13 @@ install_boot() {
mount "${RAUC_IMAGE_NAME}" "${BOOT_NEW}"
# Backup boot config
cp -f "${BOOT_MNT}"/*.txt "${BOOT_TMP}/"
cp -f "${BOOT_MNT}"/*.txt "${BOOT_TMP}/" || true
# Update
cp -rf "${BOOT_NEW}"/* "${BOOT_MNT}/"
# Restore boot config
cp -f "${BOOT_TMP}"/*.txt "${BOOT_MNT}/"
cp -f "${BOOT_TMP}"/*.txt "${BOOT_MNT}/" || true
umount "${BOOT_NEW}"
rm -rf "${BOOT_TMP}" "${BOOT_NEW}"