You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2012/09/10 22:55:52 UTC
[43/50] [abbrv] git commit: VPC : static route,
add route table in cloud-early-config
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/4.0
Commit: 6c96e638be74657db4fd65586493dea73f081c81
Parents: 541fec8
Author: anthony <an...@cloud.com>
Authored: Mon Jul 2 17:42:10 2012 -0700
Committer: Anthony Xu <an...@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
}