[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 17/24] ts-xen-install: Properly handle hosts without a static IP address
From: Robert Ho <robert.hu@xxxxxxxxx> 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 <robert.hu@xxxxxxxxx> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Tested-by: Robert Ho <robert.hu@xxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- 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 <<END; + print EO ($ho->{IpStatic} ? <<END : <<END), <<END; iface $iface inet static address $ho->{Ip} netmask $netmask gateway $gateway +END +iface $iface inet dhcp +END $bridgex END } -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |