From ebf68732e277ab06175df8a0fcde46dc7a730321 Mon Sep 17 00:00:00 2001 From: Gwenael Lambrouin Date: Mon, 13 Dec 2021 14:33:07 +0100 Subject: nfvbenchvm: add 2 debug features to build-image.sh - The new option -t (enable debug traces) allows to show in the build log the commands run in the shell scripts, including the commands defined in the disk image builder elements. - The new option -d (debug) instructs disk-image-create to drop the developer in a shell inside the chroot in case an error occurs. This makes troubleshooting of the image possible (inspect files, run commands, ...) Change-Id: I5f76e7dec64fc4c86b1515f6b81a16e11e03eadf Signed-off-by: Gwenael Lambrouin --- nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/99-cleanup | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/99-cleanup') diff --git a/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/99-cleanup b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/99-cleanup index 80dc3c0..dbb7342 100755 --- a/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/99-cleanup +++ b/nfvbenchvm/dib/elements/nfvbenchvm/post-install.d/99-cleanup @@ -1,5 +1,9 @@ #!/bin/bash +if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then + set -x +fi + # Stop on error set -euo pipefail -- cgit 1.2.3-korg