Temporarily set assigned IP via aliased interface on brick and utility servers during...
authorAndy Witter <awitter@georgialibraries.org>
Wed, 7 Nov 2018 16:09:12 +0000 (11:09 -0500)
committerAndy Witter <awitter@georgialibraries.org>
Wed, 7 Nov 2018 16:09:12 +0000 (11:09 -0500)
templates/setup-functions
templates/setup-head.sh

index f08f5f5..1f6deb4 100755 (executable)
@@ -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
index 0147837..f162c71 100755 (executable)
@@ -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