From 62d84d119a28b0653aef767b69792ce4a1e52d22 Mon Sep 17 00:00:00 2001 From: Bharat Kumar Date: Sun, 28 Jul 2013 10:31:26 +0530 Subject: [PATCH] Cloudstack-3882 remove duplicate entres of dataserver from /etc/hosts Signed-off-by: Abhinandan Prateek --- patches/systemvm/debian/config/etc/init.d/cloud-early-config | 2 ++ 1 file changed, 2 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 c0a7189d7a4..c12ca74cfcf 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -714,6 +714,8 @@ setup_dnsmasq() { [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. + //removing the existing entires to avoid duplicates on restarts. + sed -i '/data-server/d' /etc/hosts if [ -n "$ETH0_IP" ] then echo "$ETH0_IP data-server" >> /etc/hosts