From b8af4278d0616a7562efa50d15ff6a027bfd21c6 Mon Sep 17 00:00:00 2001 From: Marcus Sorensen Date: Fri, 16 Nov 2012 09:34:21 -0700 Subject: [PATCH] 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 1353083661 -0700 --- patches/systemvm/debian/config/etc/init.d/cloud-early-config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 f1c487dd47a..11380b4105d 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