From 4f4b1f56eef37ffe2b46b66a13131a2e8b7599b1 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Mon, 24 Sep 2012 12:06:18 -0700 Subject: [PATCH] CS-15094: Fix multiply vlan of redundang router This fix would work because: 1. When booting up the router, there is possible that no ip information have been set for the interface(CS would do it after confirm router is up), so the interface isn't associate with any ip, then ifconfig cannot work. We have to use ifup, this is especially true for the first router become master. 2. After booting up phase, the ip would be associated with interfaces, then we can use ifconfig to bring them up. --- .../config/root/redundant_router/enable_pubip.sh.templ | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/patches/systemvm/debian/config/root/redundant_router/enable_pubip.sh.templ b/patches/systemvm/debian/config/root/redundant_router/enable_pubip.sh.templ index ec5905d355d..ccdef0b7ea6 100644 --- a/patches/systemvm/debian/config/root/redundant_router/enable_pubip.sh.templ +++ b/patches/systemvm/debian/config/root/redundant_router/enable_pubip.sh.templ @@ -21,8 +21,14 @@ set -e ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist while read i do - ifdown $i - ifup $i + if [ "$i" == "eth2" ] + then + ifdown $i + ifup $i + else + ifconfig $i down + ifconfig $i up + fi done < /tmp/iflist ip route add default via [GATEWAY] dev eth2 && \ service cloud-passwd-srvr restart && \