mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-06-07 16:11:38 +00:00
Debug logging information
Added context lines for debugging lines.
This commit is contained in:
parent
201addb317
commit
4f1df739f6
@ -236,7 +236,7 @@ modify_vmdk_header() {
|
|||||||
|
|
||||||
# Extract the vmdk header for manipulation
|
# Extract the vmdk header for manipulation
|
||||||
dd if="${vmdk_name}" of="${descriptor}" bs=1 skip=512 count=1024
|
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 header so we are aware of the original descriptor for debugging
|
||||||
cat $descriptor
|
cat $descriptor
|
||||||
|
|
||||||
@ -249,15 +249,10 @@ modify_vmdk_header() {
|
|||||||
# add required tools version
|
# add required tools version
|
||||||
echo -n 'ddb.toolsVersion = "2147483647"' >> $newdescriptor
|
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 original descriptor and new descriptor for debugging
|
||||||
# diff exits 1 if difference. pipefail not set so piping diff
|
# diff exits 1 if difference. pipefail not set so piping diff
|
||||||
# to cat prints diff and swallows exit 1
|
# to cat prints diff and swallows exit 1
|
||||||
|
echo "Printing diff of original and new descriptors."
|
||||||
diff --text $descriptor $newdescriptor | cat
|
diff --text $descriptor $newdescriptor | cat
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user