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 <marcus@betterservers.com> 1353083661 -0700

Conflicts:
	patches/systemvm/debian/config/etc/init.d/cloud-early-config
This commit is contained in:
Marcus Sorensen 2012-11-16 09:34:21 -07:00 committed by Joe Brockmeier
parent c8bea0076b
commit cf8bc4ba82
1 changed files with 4 additions and 0 deletions

View File

@ -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