cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthon...@apache.org
Subject [2/2] git commit: VPC : static route, add route table in cloud-early-config
Date Sat, 08 Sep 2012 00:47:40 GMT
VPC : static route, add route table in cloud-early-config


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/6c96e638
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/6c96e638
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/6c96e638

Branch: refs/heads/master
Commit: 6c96e638be74657db4fd65586493dea73f081c81
Parents: 541fec8
Author: anthony <anthony@cloud.com>
Authored: Mon Jul 2 17:42:10 2012 -0700
Committer: Anthony Xu <anthony@cloud.com>
Committed: Fri Sep 7 17:46:40 2012 -0700

----------------------------------------------------------------------
 .../debian/config/etc/init.d/cloud-early-config    |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6c96e638/patches/systemvm/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
index 4bf4d6b..656d75e 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -600,7 +600,12 @@ EOF
   fi
 
   ip route delete default
+  # create route table for static route
 
+  sudo echo "251 static_route_back" >> /etc/iproute2/rt_tables 2>/dev/null
+  sudo echo "252 static_route" >> /etc/iproute2/rt_tables 2>/dev/null
+  sudo ip rule add from $VPCCIDR table static_route_back 2>/dev/null
+  sudo ip rule add from $VPCCIDR table static_route 2>/dev/null
 
   sed -i  /gateway/d /etc/hosts
 
@@ -951,6 +956,9 @@ for i in $CMDLINE
       vmpassword)
         VM_PASSWORD=$VALUE
         ;;
+      vpccidr)
+        VPCCIDR=$VALUE
+        ;;
     esac
 done
 }


Mime
View raw message