MT#9287 fix commit 9ceb9af5e9 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
changes/74/474/1
Victor Seva 11 years ago
parent dc40b24078
commit f94e6a06be

@ -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

Loading…
Cancel
Save