diff --git a/patches/systemvm/debian/config/opt/cloud/bin/vpc_ipassoc.sh b/patches/systemvm/debian/config/opt/cloud/bin/vpc_ipassoc.sh index d3436a2384a..7f137d10443 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_ipassoc.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_ipassoc.sh @@ -40,6 +40,11 @@ add_routing() { sudo ip route add $subnet/$mask dev $ethDev table $tableName proto static sudo ip route add default via $defaultGwIP table $tableName proto static sudo ip route flush cache + sudo ip route | grep default + if [ $? -gt 0 ] + then + sudo ip route add default via $defaultGwIP + fi return 0 } @@ -61,7 +66,6 @@ add_an_ip () { fi add_routing return $? - } remove_an_ip () {