From 9f68abe303fd8184ef824d62c31742fecc777fa1 Mon Sep 17 00:00:00 2001 From: yangyan Date: Fri, 28 Feb 2020 20:29:18 +0800 Subject: Change the MSB registration switch to the environment variable acquisition mode and fix typo error Change-Id: Ie6f21aad4cd9e571d3e58eaa498d1fb68470d94f Issue-ID: VFC-1601 Signed-off-by: yangyan --- zte/vmanager/docker/docker-entrypoint.sh | 4 ++-- zte/vmanager/docker/instance_config.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'zte') diff --git a/zte/vmanager/docker/docker-entrypoint.sh b/zte/vmanager/docker/docker-entrypoint.sh index 0081696d..3c731640 100755 --- a/zte/vmanager/docker/docker-entrypoint.sh +++ b/zte/vmanager/docker/docker-entrypoint.sh @@ -17,8 +17,8 @@ echo "MSB_ADDR=$MSB_ADDR" # Wait for MSB initialization echo "Wait for MSB initialization" for i in {1..5}; do - curl -sS -m 1 $MSB_PROTO:$MSB_ADDR/msb -k > /dev/null - res=$i? + curl -sS -m 1 $MSB_PROTO://$MSB_ADDR/msb -k > /dev/null + res=$? if [ $res -ne 0 ]; then break fi diff --git a/zte/vmanager/docker/instance_config.sh b/zte/vmanager/docker/instance_config.sh index fdddff02..7011f11f 100755 --- a/zte/vmanager/docker/instance_config.sh +++ b/zte/vmanager/docker/instance_config.sh @@ -4,6 +4,10 @@ MSB_PROTO=`echo $MSB_PROTO` MSB_IP=`echo $MSB_ADDR | cut -d: -f 1` MSB_PORT=`echo $MSB_ADDR | cut -d: -f 2` +if [ $REG_TO_MSB_WHEN_START ]; then + sed -i "s|REG_TO_MSB_WHEN_START = .*|REG_TO_MSB_WHEN_START = '$REG_TO_MSB_WHEN_START'|" vfc/nfvo/driver/vnfm/svnfm/zte/vmanager/driver/pub/config/config.py +fi + if [ $MSB_PROTO ]; then sed -i "s|MSB_SERVICE_PROTOCOL = .*|MSB_SERVICE_PROTOCOL = '$MSB_PROTO'|" vfc/nfvo/driver/vnfm/svnfm/zte/vmanager/driver/pub/config/config.py fi -- cgit 1.2.3-korg