From 5e16130d98b181549fffcb1df6feef3180bbf9aa Mon Sep 17 00:00:00 2001 From: anthony Date: Thu, 21 Jun 2012 18:23:55 -0700 Subject: [PATCH] VPC : if no public gateway then set up public gateway in ip assoc --- patches/systemvm/debian/config/opt/cloud/bin/vpc_ipassoc.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 () {