Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4437AD220 for ; Fri, 14 Dec 2012 07:02:42 +0000 (UTC) Received: (qmail 12043 invoked by uid 500); 14 Dec 2012 07:02:42 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 11868 invoked by uid 500); 14 Dec 2012 07:02:41 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 11818 invoked by uid 99); 14 Dec 2012 07:02:39 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 07:02:39 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B873281C71A; Fri, 14 Dec 2012 07:02:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tsp@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: virtual router: edithosts.sh cleanup fails on existing hosts Message-Id: <20121214070239.B873281C71A@tyr.zones.apache.org> Date: Fri, 14 Dec 2012 07:02:39 +0000 (UTC) Updated Branches: refs/heads/master 988ccfc45 -> 15704cfa6 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 Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/15704cfa Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/15704cfa Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/15704cfa Branch: refs/heads/master Commit: 15704cfa6cb26737342cb6293194da129147b976 Parents: 988ccfc Author: Atsushi Midorikawa Authored: Thu Dec 13 22:59:35 2012 -0800 Committer: Prasanna Santhanam Committed: Thu Dec 13 23:02:14 2012 -0800 ---------------------------------------------------------------------- patches/systemvm/debian/config/root/edithosts.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/15704cfa/patches/systemvm/debian/config/root/edithosts.sh ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/root/edithosts.sh b/patches/systemvm/debian/config/root/edithosts.sh index 3c6102d..37c75a5 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" != "" ]