From 15704cfa6cb26737342cb6293194da129147b976 Mon Sep 17 00:00:00 2001 From: Atsushi Midorikawa Date: Thu, 13 Dec 2012 22:59:35 -0800 Subject: [PATCH] virtual router: edithosts.sh cleanup fails on existing hosts The already deleted same hostname is not deleted from /etc/hosts of vRouter. vRouter's /etc/hosts format: $ip $host This patch fixes deletion logic below. sed -i /"$host "/d $HOSTS Signed-off-by: Prasanna Santhanam --- patches/systemvm/debian/config/root/edithosts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/systemvm/debian/config/root/edithosts.sh b/patches/systemvm/debian/config/root/edithosts.sh index 3c6102d61d5..37c75a53022 100755 --- a/patches/systemvm/debian/config/root/edithosts.sh +++ b/patches/systemvm/debian/config/root/edithosts.sh @@ -88,7 +88,7 @@ echo "0 $mac $ip $host *" >> $DHCP_LEASES #edit hosts file as well sed -i /"$ip "/d $HOSTS -sed -i /"$host "/d $HOSTS +sed -i /" $host$"/d $HOSTS echo "$ip $host" >> $HOSTS if [ "$dflt" != "" ]