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