From a3be727c4f2d28fb3633fe9896b258cc4aee63df Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Wed, 2 Mar 2016 12:31:08 +0100 Subject: [PATCH] MT#17673 Bypass deployment.sh debug mode to ngcp-installer (if enabled) Change-Id: Ia92c3861dc12bd21c6da70a2d09474fab78093cf (cherry picked from commit fa36ee89d8b4d59a3c50f6fe84b396fd76a83046) (cherry picked from commit 5a80b328342093ea1e2aadad3cfb5f8a9937a654) --- deployment.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/deployment.sh b/deployment.sh index ac9038e..34ae276 100755 --- a/deployment.sh +++ b/deployment.sh @@ -30,6 +30,7 @@ export LANG=C unset SHELL # defaults +DEBUG_MODE=false DEFAULT_INSTALL_DEV=eth0 DEFAULT_IP1=192.168.255.251 DEFAULT_IP2=192.168.255.252 @@ -311,14 +312,14 @@ die() { } enable_trace() { - if checkBootParam debugmode ; then + if "${DEBUG_MODE}" ; then set -x PS4='+\t ' fi } disable_trace() { - if checkBootParam debugmode ; then + if "${DEBUG_MODE}" ; then set +x PS4='' fi @@ -336,7 +337,10 @@ enable_deploy_status_server set_deploy_status "checkBootParam" -enable_trace +if checkBootParam debugmode ; then + DEBUG_MODE=true + enable_trace +fi if checkBootParam ngcpstatus ; then STATUS_WAIT=$(getBootParam ngcpstatus || true) @@ -1551,6 +1555,7 @@ SIPWISE_REPO_HOST="${SIPWISE_REPO_HOST}" SIPWISE_REPO_TRANSPORT="${SIPWISE_REPO_TRANSPORT}" NAMESERVER="$(awk '/^nameserver/ {print $2}' /etc/resolv.conf)" NGCP_PPA="${NGCP_PPA}" +DEBUG_MODE="${DEBUG_MODE}" EOF cat "${TARGET}/etc/ngcp-installer/config_deploy.inc" > /tmp/ngcp-installer-cmdline.log