bug 12704: Fix multiply public nics with redundant router

status 12704: resolved fixed
This commit is contained in:
Sheng Yang 2011-12-21 11:01:00 -08:00
parent 4db08d897e
commit 3b2e2b079b
4 changed files with 15 additions and 7 deletions

View File

@ -11,7 +11,7 @@ then
service keepalived stop >> [RROUTER_LOG] 2>&1
service conntrackd stop >> [RROUTER_LOG] 2>&1
pkill -9 keepalived >> [RROUTER_LOG] 2>&1
ifconfig eth2 down >> [RROUTER_LOG] 2>&1
[RROUTER_BIN_PATH]/disable_pubip.sh >> [RROUTER_LOG] 2>&1
echo Status: FAULT \(keepalived process is dead\) >> [RROUTER_LOG]
exit
fi

View File

@ -1,4 +1,8 @@
#!/bin/bash
ifconfig eth2 down
ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
while read i
do
ifconfig $i down
done < /tmp/iflist
service dnsmasq stop

View File

@ -1,8 +1,12 @@
#!/bin/bash
ifconfig eth2 down && \
ifconfig eth2 hw ether [ETH2MAC] && \
ifconfig eth2 [ETH2IP] netmask [ETH2MASK] && \
ifconfig eth2 up && \
set -e
ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
while read i
do
ifconfig $i down
ifconfig $i up
done < /tmp/iflist
ip route add default via [GATEWAY] dev eth2 && \
service dnsmasq restart

View File

@ -17,7 +17,7 @@ echo Enable public ip returned $ret >> [RROUTER_LOG]
if [ $ret -ne 0 ]
then
echo Fail to enable public ip! >> [RROUTER_LOG]
ifconfig eth2 down
[RROUTER_BIN_PATH]/disable_pubip.sh >> [RROUTER_LOG] 2>&1
service keepalived stop >> [RROUTER_LOG] 2>&1
service conntrackd stop >> [RROUTER_LOG] 2>&1
echo Status: FAULT \($last_msg\) >> [RROUTER_LOG]