From: Andy Witter Date: Tue, 22 Aug 2017 16:57:54 +0000 (-0400) Subject: Attempt to identify secondary interface on LVS servers and set firewall accordingly X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c15bcbd107d2d4bf288aecc8de10520f6cc3c77f;p=contrib%2Fpines%2Fgenasys.git Attempt to identify secondary interface on LVS servers and set firewall accordingly --- diff --git a/templates/setup.sh b/templates/setup.sh index 069436c..45b3d52 100755 --- a/templates/setup.sh +++ b/templates/setup.sh @@ -260,6 +260,12 @@ cat named_options.txt >> /etc/bind/named.options fi +# configure firewall for lvs servers +sed -i "s/eth1/$PRIMARY_IF/g" "/etc/network/iptables-rules.fw" +# find secondary interface +SECONDARY_IF=$(ls /sys/class/net |grep -v "lo" |grep -v "$PRIMARY_IF") +sed -i "s/eth0/$SECONDARY_IF/g" "/etc/network/iptables-rules.fw" + ConfigLogging () { ### Configure logging for the cluster. if ! cat /etc/hostname|grep -q logger