diff options
author | yangyan <yangyanyj@chinamobile.com> | 2020-02-28 19:50:19 +0800 |
---|---|---|
committer | Yan Yang <yangyanyj@chinamobile.com> | 2020-02-28 11:52:17 +0000 |
commit | 115df251a528b94db589016c07d7722fea484af1 (patch) | |
tree | 3c0bf3bf1e0985c09c2620bab140f0e2deaf3a27 /res/docker | |
parent | 0974c3f572a41ad772e7263b95f6072387c8a83e (diff) |
Change the MSB registration switch to the environment variable acquisition mode and fix typo error
Change-Id: Ifa0f27a999c7000f61c65d0a036979b5398090cc
Issue-ID: VFC-1601
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'res/docker')
-rwxr-xr-x | res/docker/docker-entrypoint.sh | 4 | ||||
-rwxr-xr-x | res/docker/instance_config.sh | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/res/docker/docker-entrypoint.sh b/res/docker/docker-entrypoint.sh index ec53bd9..60abc80 100755 --- a/res/docker/docker-entrypoint.sh +++ b/res/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/res/docker/instance_config.sh b/res/docker/instance_config.sh index 6ed2988..c770a2b 100755 --- a/res/docker/instance_config.sh +++ b/res/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/vnfres/res/res/pub/config/config.py +fi if [ $MSB_PROTO ]; then sed -i "s|MSB_SERVICE_PROTOCOL = .*|MSB_SERVICE_PROTOCOL = '$MSB_PROTO'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py |