Make sure DIB_DEBUG_TRACE has a default value

After the introduction of 'Add output for mis-configured element
scripts' we started seeing CI failures in tripleo where
instack-undercloud is being used (rocky/queens):

  /usr/lib/python2.7/site-packages/diskimage_builder/lib/dib-run-parts: line 108: DIB_DEBUG_TRACE: unbound variable
  INFO: 2019-12-02 16:24:33,423 -- ############### End stdout/stderr logging ###############
  ERROR: 2019-12-02 16:24:33,423 -- Hook FAILED.

Let's make sure that by default the env variable is set
to 0.

Change-Id: I38c76c0edee436f1e7dd0c9a868cea1e6ee3271d
Closes-Bug: #1854904
This commit is contained in:
Michele Baldessari 2019-12-03 08:23:48 +01:00
parent a231bc6b9f
commit f9dcbd30cc

View File

@ -105,6 +105,7 @@ if [ "$show_list" == "1" ] ; then
exit 0
fi
DIB_DEBUG_TRACE=${DIB_DEBUG_TRACE:-0}
if [ ${DIB_DEBUG_TRACE} -gt 0 ]; then
non_exec=$(find $target_dir -maxdepth 1 -xtype f \! -executable -printf '%f\n')
if [ ! -z "$non_exec" ]; then