Add IMAGE_DEBUG variable
[snf-image] / snf-image-host / create
index 00eb811..dad9fd0 100755 (executable)
@@ -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"