From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 25/26] ts-xen-install: Properly handle hosts without a static IP address Date: Fri, 25 Sep 2015 20:15:21 +0100 Message-ID: <1443208522-24905-17-git-send-email-ian.jackson@eu.citrix.com> References: <1443181028-22705-1-git-send-email-ian.jackson@eu.citrix.com> <1443208522-24905-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZfYTU-0001bR-E7 for xen-devel@lists.xenproject.org; Fri, 25 Sep 2015 19:16:04 +0000 In-Reply-To: <1443208522-24905-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Robert Ho , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org From: Robert Ho Check IpStatic, and if it is not set, provide a dhcp stanza in /etc/network/interfaces, rather than an `inet static' one. This is necessary for L1 nested hosts, because they don't have a static IP address. In principle this makes matters more correct for physical hosts without static IP addresses, but these are currently not supported by selecthost(). Signed-off-by: Robert Ho Signed-off-by: Ian Jackson --- v14: Only use `inet dhcp' if !$ho->{IpStatic}. --- ts-xen-install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ts-xen-install b/ts-xen-install index b511e2b..d9aa694 100755 --- a/ts-xen-install +++ b/ts-xen-install @@ -320,11 +320,14 @@ END /auto $iface\n/x; if (m/^\s* iface \s+ (?: $physif | xenbr0 ) \s+ inet \s /x) { $suppress= 1; - print EO <{IpStatic} ? <{Ip} netmask $netmask gateway $gateway +END +iface $iface inet dhcp +END $bridgex END } -- 1.7.10.4