mirror of https://github.com/apache/cloudstack.git
Summary: Fix virtual router trying to resolve own host name (v2)
Detail: Make change in 95df86e1e0 be specific
to VPC.
BUG-ID : NONE
Reviewed-by: Marcus Sorensen
Reported-by: Marcus Sorensen
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1351695701 -0600
This commit is contained in:
parent
95df86e1e0
commit
761b4f60a1
|
|
@ -597,6 +597,11 @@ setup_vpcrouter() {
|
|||
setup_vmware_extra_nics
|
||||
fi
|
||||
|
||||
if [ -f /etc/hosts ]; then
|
||||
host=`hostname -s`;
|
||||
grep -q $host /etc/hosts || echo "127.0.0.1 $host" >> /etc/hosts;
|
||||
fi
|
||||
|
||||
cat > /etc/network/interfaces << EOF
|
||||
auto lo $1
|
||||
iface lo inet loopback
|
||||
|
|
@ -814,18 +819,9 @@ change_password() {
|
|||
fi
|
||||
}
|
||||
|
||||
set_etc_hosts() {
|
||||
if [ -f /etc/hosts ]; then
|
||||
host=`hostname -s`;
|
||||
grep -q $host /etc/hosts || echo "127.0.0.1 $host" >> /etc/hosts;
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
# Clear /tmp for file lock
|
||||
rm -f /tmp/*.lock
|
||||
# fix lookups for our hostname (iptables, etc)
|
||||
set_etc_hosts
|
||||
local hyp=$(hypervisor)
|
||||
[ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out of early init" && exit 10
|
||||
log_it "Detected that we are running inside $hyp guest"
|
||||
|
|
|
|||
Loading…
Reference in New Issue