From cf8bc4ba82b46febeb274334a0233fc0e1c6edab 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 Conflicts: patches/systemvm/debian/config/etc/init.d/cloud-early-config --- patches/systemvm/debian/config/etc/init.d/cloud-early-config | 4 ++++ 1 file changed, 4 insertions(+) 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 bfcc6edf138..11380b4105d 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -597,6 +597,10 @@ setup_vpcrouter() { setup_vmware_extra_nics fi + if [ -f /etc/hosts ]; then + grep -q $NAME /etc/hosts || echo "127.0.0.1 $NAME" >> /etc/hosts; + fi + cat > /etc/network/interfaces << EOF auto lo $1 iface lo inet loopback