Skip to content

Commit 49d91d2

Browse files
authored
Display message when CoCo disk creation abort (#709)
Fix ALEPH-211
1 parent 90bae31 commit 49d91d2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/example_confidential_image/build_debian_image.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ cleanup() {
1818
return
1919
fi
2020
CLEANUP_DONE=true
21-
echo "Cleaning up..."
2221
if mountpoint -q "${MOUNT_POINT}"; then
2322
sudo umount --recursive "${MOUNT_POINT}" || echo "Failed to unmount ${MOUNT_POINT}"
2423
fi
@@ -43,6 +42,15 @@ cleanup() {
4342
# - TERM (SIGTERM): Signal 15, sent by the kill command to request the process to terminate gracefully.
4443
trap cleanup EXIT HUP INT QUIT PIPE TERM
4544

45+
error_handler() {
46+
echo ""
47+
echo "An error occured while building the image and the process was not completed properly."
48+
echo "Please check the log, fix any error if required and restart the script."
49+
echo "For more help see https://docs.aleph.im/computing/confidential/encrypted-disk/"
50+
}
51+
52+
trap error_handler ERR
53+
4654
usage() {
4755
cat <<USAGE >&2
4856
Usage:

0 commit comments

Comments
 (0)