diff options
author | yangyan <yangyanyj@chinamobile.com> | 2020-02-28 19:53:58 +0800 |
---|---|---|
committer | Yan Yang <yangyanyj@chinamobile.com> | 2020-02-28 11:54:46 +0000 |
commit | fbada6f540868e97fa426b24fd0271822b3893ec (patch) | |
tree | 81f6a17b2bde14ba717f9f6a1c2db3dcb2ae7cf4 /mgr/docker | |
parent | 275dd81783aef1e73a59d13788d37d6395430e0f (diff) |
Change the MSB registration switch to the environment variable acquisition mode and fix typo error
Change-Id: Id3b717f029dadc8ac0901d85ee59eb29dad339a0
Issue-ID: VFC-1601
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'mgr/docker')
-rwxr-xr-x | mgr/docker/docker-entrypoint.sh | 4 | ||||
-rwxr-xr-x | mgr/docker/instance_config.sh | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/mgr/docker/docker-entrypoint.sh b/mgr/docker/docker-entrypoint.sh index 55e6890..3f290c9 100755 --- a/mgr/docker/docker-entrypoint.sh +++ b/mgr/docker/docker-entrypoint.sh @@ -20,8 +20,8 @@ echo "MYSQL_ADDR=$MYSQL_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/mgr/docker/instance_config.sh b/mgr/docker/instance_config.sh index 3259f48..54c4528 100755 --- a/mgr/docker/instance_config.sh +++ b/mgr/docker/instance_config.sh @@ -3,6 +3,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/gvnfm/vnfmgr/mgr/mgr/pub/config/config.py +fi if [ $MSB_IP ]; then sed -i "s|MSB_SERVICE_IP.*|MSB_SERVICE_IP = '$MSB_IP'|" vfc/gvnfm/vnfmgr/mgr/mgr/pub/config/config.py |