Commit ded30adf authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Add IMAGE_DEBUG variable

if this is set, then snf-image will run in debug mode.
parent f55d6d0c
......@@ -372,6 +372,7 @@ fi
: ${VARIANTS_DIR:="@sysconfdir@/ganeti/snf-image/variants"}
: ${IMAGE_DIR:="@localstatedir@/lib/snf-image"}
: ${IMAGE_DEBUG:="no"}
: ${HELPER_DIR:="@HELPER_DIR@"}
: ${HELPER_IMG:="@HELPER_IMG@"}
: ${HELPER_KERNEL:="@HELPER_KERNEL@"}
......
......@@ -24,6 +24,13 @@ set -o pipefail
ganeti_os_main
if [ "$IMAGE_DEBUG" = "yes" ]; then
PS4='$(date "+%s.%N ($LINENO) + ")'
set -x
elif [ "$IMAGE_DEBUG" != "no" ]; then
echo "Warning: Unsupported IMAGE_DEBUG value: \`$IMAGE_DEBUG'"
fi
# Save stderr to a file
stderr=$(mktemp)
add_cleanup rm "$stderr"
......
......@@ -10,7 +10,7 @@
# IMAGE_DIR="/var/lib/snf-image"
# IMAGE_DEBUG: turn on debugging output for the scripts
# IMAGE_DEBUG=0
# IMAGE_DEBUG=no
# HELPER_DIR: Directory hosting the helper files
# HELPER_DIR="/var/lib/snf-image/helper/"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment