direct-io.hg

changeset 7841:dee321bf18e9

Dom0 might not be called Domain-0, so ask for the name in shutdown.py, instead of hardcoding it

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
author jmb@artemis.home.pimb.org
date Wed Nov 16 13:34:52 2005 +0100 (2005-11-16)
parents 5019c8d034c4
children 8ed932ab9f2a
files tools/python/xen/xm/shutdown.py
line diff
     1.1 --- a/tools/python/xen/xm/shutdown.py	Wed Nov 16 11:32:14 2005 +0100
     1.2 +++ b/tools/python/xen/xm/shutdown.py	Wed Nov 16 13:34:52 2005 +0100
     1.3 @@ -22,9 +22,9 @@ import sys
     1.4  import time
     1.5  
     1.6  from xen.xend.XendClient import server
     1.7 +from xen.xend import sxp
     1.8  from xen.xm.opts import *
     1.9  
    1.10 -DOM0_NAME = 'Domain-0'
    1.11  DOM0_ID = '0'
    1.12  
    1.13  gopts = Opts(use="""[options] [DOM]
    1.14 @@ -54,7 +54,8 @@ gopts.opt('reboot', short='R',
    1.15  
    1.16  def shutdown(opts, doms, mode, wait):
    1.17      if doms == None: doms = server.xend_domains()
    1.18 -    for x in [DOM0_NAME, DOM0_ID]:
    1.19 +    dom0_name = sxp.child_value(server.xend_domain(0), 'name')
    1.20 +    for x in [dom0_name, DOM0_ID]:
    1.21          if x in doms:
    1.22              doms.remove(x)
    1.23      for d in doms: