Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion examples/example_confidential_image/build_debian_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ cleanup() {
return
fi
CLEANUP_DONE=true
echo "Cleaning up..."
if mountpoint -q "${MOUNT_POINT}"; then
sudo umount --recursive "${MOUNT_POINT}" || echo "Failed to unmount ${MOUNT_POINT}"
fi
Expand All @@ -43,6 +42,15 @@ cleanup() {
# - TERM (SIGTERM): Signal 15, sent by the kill command to request the process to terminate gracefully.
trap cleanup EXIT HUP INT QUIT PIPE TERM

error_handler() {
echo ""
echo "An error occured while building the image and the process was not completed properly."
echo "Please check the log, fix any error if required and restart the script."
echo "For more help see https://docs.aleph.im/computing/confidential/encrypted-disk/"
}

trap error_handler ERR

usage() {
cat <<USAGE >&2
Usage:
Expand Down