TT#14516 Add more debug for ngcp-installer execution section from grml-chroot

It should improve debuging the situation with non-zero exit codes.

Change-Id: Icc5816ac0f710bc8b005bb136b2691e478361c5a
changes/03/12703/9
Alexander Lutay 8 years ago committed by Michael Prokop
parent b3ad534302
commit 459cef9485

@ -1714,16 +1714,18 @@ EOT
gen_installer_config
# execute ngcp-installer
cat << EOT | grml-chroot $TARGET /bin/bash
cat << "EOT" | grml-chroot $TARGET /bin/bash
echo "Running ngcp-installer via grml-chroot." | tee -a /tmp/ngcp-installer-debug.log
ngcp-installer 2>&1 | tee -a /tmp/ngcp-installer-debug.log
RC=\${PIPESTATUS[0]}
if [ \$RC -ne 0 ] ; then
echo "ERROR: Fatal error while running ngcp-installer!" >&2
exit \$RC
RC=${PIPESTATUS[0]}
if [ "${RC}" = "0" ] ; then
echo "OK, ngcp-installer finished with exit code '${RC}', continue netscript deployment." | tee -a /tmp/ngcp-installer-debug.log
else
echo "ERROR: Fatal error while running ngcp-installer (exit code '${RC}')!" | tee -a /tmp/ngcp-installer-debug.log >&2
exit ${RC}
fi
EOT
# baby, something went wrong!
if [ $? -eq 0 ] ; then
logit "installer: success"
else

Loading…
Cancel
Save