Debug logging information

Added context lines for debugging lines.
sil2100/proposed-components
John Chittum 4 years ago
parent 201addb317
commit 4f1df739f6
No known key found for this signature in database
GPG Key ID: FC52138B0F49EA8E

@ -236,7 +236,7 @@ modify_vmdk_header() {
# Extract the vmdk header for manipulation
dd if="${vmdk_name}" of="${descriptor}" bs=1 skip=512 count=1024
echo "Cat'ing original descriptor to console for debugging."
# cat header so we are aware of the original descriptor for debugging
cat $descriptor
@ -249,15 +249,10 @@ modify_vmdk_header() {
# add required tools version
echo -n 'ddb.toolsVersion = "2147483647"' >> $newdescriptor
# check ddb.toolsVersion in descriptor, otherwise image will fail
if ! grep -q 'ddb.toolsVersion' $newdescriptor; then
echo 'failed to write version. Descriptor invalid'; \
exit 1
fi
# diff original descriptor and new descriptor for debugging
# diff exits 1 if difference. pipefail not set so piping diff
# to cat prints diff and swallows exit 1
echo "Printing diff of original and new descriptors."
diff --text $descriptor $newdescriptor | cat

Loading…
Cancel
Save