ia64/xen-unstable

changeset 2037:88e84faa66c2

bitkeeper revision 1.1108.52.1 (410eb854DZhEQqBAsiFdxS10QzU2Sg)

Avoid putting ip= on linux command line unless the user actually wants an address set or is using kernel dhcp.
author iap10@labyrinth.cl.cam.ac.uk
date Mon Aug 02 21:55:32 2004 +0000 (2004-08-02)
parents e231cd8ec652
children 803c7064587a
files tools/python/xen/xm/create.py
line diff
     1.1 --- a/tools/python/xen/xm/create.py	Mon Aug 02 14:50:46 2004 +0000
     1.2 +++ b/tools/python/xen/xm/create.py	Mon Aug 02 21:55:32 2004 +0000
     1.3 @@ -354,18 +354,17 @@ def preprocess_vifs(opts, vals):
     1.4      vals.vif = vifs
     1.5  
     1.6  def preprocess_ip(opts, vals):
     1.7 -    setip = (vals.hostname or vals.netmask
     1.8 -             or vals.nfs_server
     1.9 -             or vals.gateway or vals.dhcp or vals.interface)
    1.10 -    if not setip: return
    1.11 -    dummy_nfs_server = '1.2.3.4'
    1.12 -    ip = (vals.ip
    1.13 +    if vals.ip or vals.dhcp != 'off':
    1.14 +        dummy_nfs_server = '1.2.3.4'
    1.15 +        ip = (vals.ip
    1.16            + ':' + (vals.nfs_server or dummy_nfs_server)
    1.17            + ':' + vals.gateway
    1.18            + ':' + vals.netmask
    1.19            + ':' + vals.hostname
    1.20            + ':' + vals.interface
    1.21            + ':' + vals.dhcp)
    1.22 +    else:
    1.23 +        ip = ''
    1.24      vals.cmdline_ip = ip
    1.25  
    1.26  def preprocess_nfs(opts, vals):