From: Andy Witter Date: Wed, 7 Nov 2018 16:09:12 +0000 (-0500) Subject: Temporarily set assigned IP via aliased interface on brick and utility servers during... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bdffd8187b7b4974784b4c0b48da1341279acd7b;p=contrib%2Fpines%2Fgenasys.git Temporarily set assigned IP via aliased interface on brick and utility servers during installation. --- 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