From bdffd8187b7b4974784b4c0b48da1341279acd7b Mon Sep 17 00:00:00 2001 From: Andy Witter Date: Wed, 7 Nov 2018 11:09:12 -0500 Subject: [PATCH] Temporarily set assigned IP via aliased interface on brick and utility servers during installation. --- templates/setup-functions | 8 ++++++++ templates/setup-head.sh | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/templates/setup-functions b/templates/setup-functions index f08f5f5..1f6deb4 100755 --- a/templates/setup-functions +++ b/templates/setup-functions @@ -2,6 +2,14 @@ ### common functions for setup files. +GetNic () { ### get the active network inteface name +NETWORK_INTERFACE="$(ip route|grep default|awk '{ print $5 }')" +} + +SetAliasedIP () { ### Add aliased interface to set the correct IP for installation. +ip a add MY_IP_ADDRESS/BIT_MASK dev $NETWORK_INTERFACE label ${NETWORK_INTERFACE}:0 +} + InstallDebs () { ### install included debian packages # setup simpleserver manually because it broken in cpan if [ "$OSDISTRO" == "Debian" ] ; then diff --git a/templates/setup-head.sh b/templates/setup-head.sh index 0147837..f162c71 100755 --- a/templates/setup-head.sh +++ b/templates/setup-head.sh @@ -135,6 +135,11 @@ fi ### Fix ejabberd/apparmor bug - commented out because it's not working #FixAppArmorEJabberD +GetNic ### Get the network interface + +### Temporary create and alias interface for installation +ip a add Priv_IP/My_CIDR dev $NETWORK_INTERFACE label ${NETWORK_INTERFACE}:0 + ### Install Opensrf and Evergreen debs. if [ -e debconf-settings ] then -- 2.11.0