From a7c3140457a64ef4d16e2e3696d860042f2a397f Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Fri, 18 Oct 2013 09:41:05 +0200 Subject: [PATCH] MT#4497 Add deployment.sh logging --- deployment.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deployment.sh b/deployment.sh index f6086e6..b91d62b 100755 --- a/deployment.sh +++ b/deployment.sh @@ -2,6 +2,10 @@ # Purpose: automatically install Debian + sip:provider platform ################################################################################ +INSTALL_LOG='/tmp/deployment-installer-debug.log' +exec > >(tee -a $INSTALL_LOG ) +exec 2> >(tee -a $INSTALL_LOG >&2) + # set version to git commit ID SCRIPT_VERSION="%SCRIPT_VERSION%" @@ -1989,6 +1993,10 @@ rm -f ${TARGET}/config_*yml rm -f ${TARGET}/constants_*.yml rm -f ${TARGET}/ngcp-installer*deb +if [ -r "${INSTALL_LOG}" ] && [ -d "${TARGET}"/var/log/ ] ; then + cp "${INSTALL_LOG}" "${TARGET}"/var/log/ +fi + # don't leave any mountpoints sync umount ${TARGET}/proc 2>/dev/null || true