From b64baf144d1bd111edba210594183bd14d5f187d Mon Sep 17 00:00:00 2001 From: Rohan Date: Wed, 3 Aug 2022 14:09:09 +0000 Subject: [PATCH] Resolve AMF ip address using FQDN --- docker/scripts/gnb_entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/scripts/gnb_entrypoint.sh b/docker/scripts/gnb_entrypoint.sh index ac0e0d4c88..6deff8da10 100755 --- a/docker/scripts/gnb_entrypoint.sh +++ b/docker/scripts/gnb_entrypoint.sh @@ -18,6 +18,10 @@ if [[ -v USE_SA_NFAPI_VNF ]]; then cp $PREFIX/etc/gnb.sa.nfapi.vnf.conf $PREFIX/ # Sometimes, the templates are not enough. We mount a conf file on $PREFIX/etc. It can be a template itself. if [[ -v USE_VOLUMED_CONF ]]; then cp $PREFIX/etc/mounted.conf $PREFIX/etc/gnb.conf; fi +# Resolve AMF FQDN +AMF_FQDN=${AMF_FQDN:-oai-amf-svc} +if ($USE_FQDN); then AMF_IP_ADDRESS=(`getent hosts $AMF_FQDN | awk '{print $1}'`); fi + # Only this template will be manipulated CONFIG_FILES=`ls $PREFIX/etc/gnb.conf || true`