Updated Branches:
  refs/heads/master 6e86fac8e -> b8af4278d

Summary: VPC router needs /etc/hosts entry

Detail: This adjusts cloud-early-config to properly set the host entry for a
   vpc router. We were previously using the hostname command prior to the actual
   hostname being set, now we use the NAME variable passed to us.

BUG-ID: CLOUDSTACK-502
Bugfix-for: 4.0.1
Signed-off-by: Marcus Sorensen <[email protected]> 1353083661 -0700


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

Branch: refs/heads/master
Commit: b8af4278d0616a7562efa50d15ff6a027bfd21c6
Parents: 6e86fac
Author: Marcus Sorensen <[email protected]>
Authored: Fri Nov 16 09:34:21 2012 -0700
Committer: Marcus Sorensen <[email protected]>
Committed: Fri Nov 16 09:34:21 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b8af4278/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 f1c487d..11380b4 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -598,8 +598,7 @@ setup_vpcrouter() {
   fi
 
   if [ -f /etc/hosts ]; then
-    host=`hostname -s`;
-    grep -q $host /etc/hosts || echo "127.0.0.1 $host" >> /etc/hosts;
+    grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts;
   fi
 
     cat > /etc/network/interfaces << EOF

Reply via email to