From: Robert Ho <robert...@intel.com> 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...@intel.com> Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com> Tested-by: Robert Ho <robert...@intel.com> --- 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@lists.xen.org http://lists.xen.org/xen-devel