1
1
mirror of https://schlomp.space/tastytea/hashboot synced 2024-11-07 15:19:17 +01:00

Merge pull request #10 from tastytea/fix-error-creating-backup

Fix error when creating first backup.
This commit is contained in:
Teldra 2019-02-24 17:26:23 +01:00 committed by GitHub
commit 7eef7d017a
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -213,7 +213,14 @@ then
mv ${DIGEST_FILE_TMP} ${DIGEST_FILE}
else
write_hashes $DIGEST_FILE
tar -cpPf ${BACKUP_FILE} ${BIOS_TMP} ${MBR_TMP} /boot ${DIGEST_FILE} || die 7 "Error writing ${BACKUP_FILE}"
INCLUDE_FILES=""
if [ -f "${MBR_TMP}" ]; then
INCLUDE_FILES="${INCLUDE_FILES} ${MBR_TMP}"
fi
if [ -f "${BIOS_TMP}" ]; then
INCLUDE_FILES="${BIOS_TMP}"
fi
tar -cpPf "${BACKUP_FILE}" ${INCLUDE_FILES} /boot ${DIGEST_FILE} || die 7 "Error writing ${BACKUP_FILE}"
echo "Backup written to ${BACKUP_FILE}"
fi