Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD81910F74 for ; Mon, 15 Jul 2013 14:33:20 +0000 (UTC) Received: (qmail 87125 invoked by uid 500); 15 Jul 2013 14:33:20 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 87094 invoked by uid 500); 15 Jul 2013 14:33:20 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 87083 invoked by uid 99); 15 Jul 2013 14:33:20 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jul 2013 14:33:20 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1350789DB19; Mon, 15 Jul 2013 14:33:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jayapal@apache.org To: commits@cloudstack.apache.org Date: Mon, 15 Jul 2013 14:33:21 -0000 Message-Id: In-Reply-To: <3c405591923a401f86f3c2bdf836ba87@git.apache.org> References: <3c405591923a401f86f3c2bdf836ba87@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] git commit: updated refs/heads/4.2 to 34582d6 CLOUDSTACK-3533 Fixed dhcphosts.txt for two entries and also dhcp_relase for ipv6 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/34582d67 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/34582d67 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/34582d67 Branch: refs/heads/4.2 Commit: 34582d672fe3f9643a2afa3135b3d19b66ded942 Parents: ffbc30d Author: Jayapal Authored: Mon Jul 15 20:02:31 2013 +0530 Committer: Jayapal Committed: Mon Jul 15 20:02:56 2013 +0530 ---------------------------------------------------------------------- patches/systemvm/debian/config/root/edithosts.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/34582d67/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 2d99586..817d726 100755 --- a/patches/systemvm/debian/config/root/edithosts.sh +++ b/patches/systemvm/debian/config/root/edithosts.sh @@ -96,11 +96,18 @@ wait_for_dnsmasq () { return 1 } -if [ "$ipv4" != '' -a $no_dhcp_release -eq 0 ] +if [ $ipv4 ] +then + ip=$ipv4 +else + ip=$ipv6 +fi + +if [ $no_dhcp_release -eq 0 ] then #release previous dhcp lease if present logger -t cloud "edithosts: releasing $ipv4" - dhcp_release eth0 $ipv4 $(grep $ipv4 $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 + dhcp_release eth0 $ip $(grep $ip $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 logger -t cloud "edithosts: released $ipv4" fi @@ -118,7 +125,8 @@ then fi if [ $ipv6 ] then - sed -i /$ipv6,/d $DHCP_HOSTS + #searching with [$ipv6], matching other ip so using $ipv6], + 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