From f94e6a06be43da77ff3419fc0665b86ebb832c6b Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Thu, 30 Oct 2014 13:32:51 +0100 Subject: [PATCH] MT#9287 fix commit 9ceb9af5e96 Bootstrap /etc/ngcp_mgmt_node for usage in ngcpcfg carrier At that point disk is not even created. Move the creation of the file later. Change-Id: I74085eed066bce0a3465c84daf79192fd6a4be3b --- deployment.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/deployment.sh b/deployment.sh index 0e31a0d..3d36a6e 100755 --- a/deployment.sh +++ b/deployment.sh @@ -663,11 +663,6 @@ if "$PRO_EDITION" ; then IP1=$(awk '/sp1/ { print $1 }' /tmp/hosts) || IP1=$DEFAULT_IP1 IP2=$(awk '/sp2/ { print $1 }' /tmp/hosts) || IP2=$DEFAULT_IP2 - # required for bootstrapping remote origin in ngcpcfg carrier setup - MGMT_NAME=$(awk "/^$MANAGEMENT_IP/ {print \$2}" /tmp/hosts) - echo "$MGMT_NAME" | sed 's/a$// ; s/b$//' > "${TARGET}/etc/ngcp_mgmt_node" - logit "MGMT_NAME = $MGMT_NAME" - wget --timeout=30 -O "/tmp/interfaces" "${MANAGEMENT_IP}:3000/nwconfig/${TARGET_HOSTNAME}" INTERNAL_NETMASK=$(grep "$INTERNAL_DEV inet" -A2 /tmp/interfaces | awk '/netmask/ { print $2 }') \ || INTERNAL_NETMASK=$DEFAULT_INTERNAL_NETMASK @@ -1217,6 +1212,10 @@ EOF if "$RETRIEVE_MGMT_CONFIG" ; then echo "Retrieving /etc/hosts configuration from management server" wget --timeout=30 -O "$TARGET/etc/hosts" "${MANAGEMENT_IP}:3000/hostconfig/$(cat ${TARGET}/etc/hostname)" + # required for bootstrapping remote origin in ngcpcfg carrier setup + MGMT_NAME=$(awk "/^$MANAGEMENT_IP/ {print \$2}" ${TARGET}/etc/hosts) + echo "Generating /etc/ngcp_mgmt_node file [${MGMT_NAME}]" + echo "${MGMT_NAME}" | sed 's/a$// ; s/b$//' > "${TARGET}/etc/ngcp_mgmt_node" fi if "$PRO_EDITION" ; then