From aae393dcd5bb5d96267ada1f6ed142b63a39f685 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 10 Dec 2014 18:04:25 +0530 Subject: [PATCH] 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 (cherry picked from commit 63298d9b742811919717ffd6303c8a2e9d37a3dd) Signed-off-by: Rohit Yadav --- systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh b/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh index 4912bcecc78..f0d9c00ddf4 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh +++ b/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh @@ -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 ]