From 5780b93ba3897650567b208dd32b660cb056fa37 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Wed, 12 Sep 2018 14:17:37 +0200 Subject: [PATCH] TT#16553 Improve the debug output for ngcp-installer section of deployment.sh Most of comments there are valid log/debug statements. No need to hide them inside comments. Change-Id: I08f86879ef6f6bdc89ce2886e09d54b3d8fe5212 --- templates/scripts/includes/deployment.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index 56fa8f0..7c774de 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -1379,24 +1379,23 @@ EOF } if "$NGCP_INSTALLER" ; then - # set INSTALLER_PATH and INSTALLER depending on release/version + set_deploy_status "ngcp-installer" + + echo "Searching for proper ngcp-installer package ..." get_installer_path - # generate debian/sipwise repos + echo "Generating debian/sipwise APT repos ..." set_repos - set_deploy_status "ngcp-installer" - - # install ngcp-installer - echo "Using package ngcp-installer: ${INSTALLER}" + echo "Installing package ngcp-installer: ${INSTALLER}" grml-chroot "${TARGET}" "wget \"${INSTALLER_PATH}/${INSTALLER}\"" grml-chroot "${TARGET}" "dpkg -i \"${INSTALLER}\"" grml-chroot "${TARGET}" "rm -f \"${INSTALLER}\"" - # generate installer configs + echo "Generating ngcp-installer configs ..." gen_installer_config - # generate ngcp-installer run script + echo "Generating ngcp-installer run script ..." cat > "${TARGET}/tmp/ngcp-installer-deployment.sh" << "EOT" #!/bin/bash echo "Running ngcp-installer via grml-chroot." | tee -a /tmp/ngcp-installer-debug.log @@ -1410,7 +1409,7 @@ else fi EOT - # execute ngcp-installer + echo "Execute ngcp-installer inside deployment chroot environment ..." if grml-chroot "${TARGET}" /bin/bash /tmp/ngcp-installer-deployment.sh ; then echo "ngcp-installer finished successfully" @@ -1433,12 +1432,12 @@ EOT die "Error during installation of ngcp. Find details at: ${TARGET}/tmp/ngcp-installer.log ${TARGET}/tmp/ngcp-installer-debug.log" fi - # nuke files + echo "Temporary files cleanup ..." find "${TARGET}/var/log" -type f -size +0 -not -name \*.ini -exec sh -c ":> \${1}" sh {} \; :>$TARGET/var/run/utmp :>$TARGET/var/run/wtmp - # make a backup of the installer logfiles for later investigation + echo "Backup of the installer logfiles for later investigation ..." if [ -r "${TARGET}"/tmp/ngcp-installer.log ] ; then cp "${TARGET}"/tmp/ngcp-installer.log "${TARGET}"/var/log/ fi