CLOUDSTACK-7974: remove old hostname entry for a VM when adding a VM

When adding a VM, it adds an entry to /etc/hosts file on the VR but does not
clear up any older entries for the VM with a same name. The fix uncomments the
command that removes any old entries in the VM.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 63298d9b742811919717ffd6303c8a2e9d37a3dd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2014-12-10 18:04:25 +05:30
parent 8278d88f76
commit f38c2f87b1

View File

@ -121,8 +121,7 @@ then
sed -i /$ipv6],/d $DHCP_HOSTS
fi
# don't want to do this in the future, we can have same VM with multiple nics/entries
#sed -i /$host,/d $DHCP_HOSTS
sed -i /$host,/d $DHCP_HOSTS
#put in the new entry
if [ $ipv4 ]