From 69b58f4fd16a97a2d74dc6be9ec6e22ce2178945 Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Thu, 4 Oct 2018 14:52:49 +0300 Subject: [PATCH] TT#44969 Pass ngcppxeinstall parameter to config file For Pro installation from another node we use internal network for installation and we do not need to configure gateway on internal interface. Change-Id: I8e95851c1b2132728e8846cf0c1d0d5149d06d74 --- templates/scripts/includes/deployment.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index 66274a5..4d42086 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -98,6 +98,7 @@ SIPWISE_APT_KEY_PATH="/etc/apt/trusted.gpg.d/sipwise.gpg" # overriden later, although since the checksum is the same we could use this URL # also for Pro/Carrier installations SIPWISE_APT_KEY_URL_PATH="/spce/sipwise.gpg" +NGCP_PXE_INSTALL=false ADDITINAL_PACKAGES=(git augeas-tools gdisk) @@ -657,6 +658,10 @@ if checkBootParam 'debootstrapkey=' ; then GPG_KEY=$(getBootParam debootstrapkey) fi +if checkBootParam 'ngcppxeinstall' ; then + NGCP_PXE_INSTALL=true +fi + DEBIAN_URL="${DEBIAN_REPO_TRANSPORT}://${DEBIAN_REPO_HOST}" SIPWISE_URL="${SIPWISE_REPO_TRANSPORT}://${SIPWISE_REPO_HOST}" @@ -1552,6 +1557,7 @@ DEFAULT_INTERNAL_NETMASK="${DEFAULT_INTERNAL_NETMASK}" INTERNAL_NETMASK="${INTERNAL_NETMASK}" RETRIEVE_MGMT_CONFIG="${RETRIEVE_MGMT_CONFIG}" MANAGEMENT_IP="${MANAGEMENT_IP}" +NGCP_PXE_INSTALL="${NGCP_PXE_INSTALL}" EOF fi @@ -1622,8 +1628,13 @@ EOT if "${DHCP}" ; then NET_DEV="${INSTALL_DEV}" METHOD='dhcp' "${netcardconf}" else - NET_DEV="${INSTALL_DEV}" METHOD='static' IPADDR="${INSTALL_IP}" NETMASK="${EXTERNAL_NETMASK}" \ + if "${PRO_EDITION}" && "${NGCP_PXE_INSTALL}" ; then + NET_DEV="${INSTALL_DEV}" METHOD='static' IPADDR="${INSTALL_IP}" NETMASK="${EXTERNAL_NETMASK}" \ + "${netcardconf}" + else + NET_DEV="${INSTALL_DEV}" METHOD='static' IPADDR="${INSTALL_IP}" NETMASK="${EXTERNAL_NETMASK}" \ GATEWAY="${GW}" "${netcardconf}" + fi fi fi echo "Copying /etc/network/interfaces ..."