From e40ec0137ee640e034ab1638e59e8ba7c9cf3cf6 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 30 May 2017 16:06:05 +0200 Subject: [PATCH] MT#16391 Fix regression regarding unset NGCP_PORTFILE Fix regression from d62433cf93bcdbf77e4da976647c81bcb90fd2b8 if NGCP_PORTFILE is unset Change-Id: I9ac5e793d1a3bc4d8e3094c6b70987fcf42cf978 --- helper/tt2-wrapper | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helper/tt2-wrapper b/helper/tt2-wrapper index 578b2d1f..5c8f7e24 100755 --- a/helper/tt2-wrapper +++ b/helper/tt2-wrapper @@ -1,6 +1,8 @@ #!/bin/bash -if [ -r "${NGCP_PORTFILE:-/var/run/ngcpcfg.port}" ] ; then +NGCP_PORTFILE="${NGCP_PORTFILE:-/var/run/ngcpcfg.port}" + +if [ -r "${NGCP_PORTFILE}" ] ; then port=$(cat "${NGCP_PORTFILE}") else echo "ERROR: Couldn't read file ${NGCP_PORTFILE}" >&2