ia64/xen-unstable

changeset 13335:2dba70eb5bd5

Fix for pygrub path on Solaris.

Signed-off-by: John Levon <john.levon@sun.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Tue Jan 09 13:24:40 2007 +0000 (2007-01-09)
parents 9518bff7c762
children 6638763ee12c
files tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/osdep.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue Jan 09 12:04:41 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Jan 09 13:24:40 2007 +0000
     1.3 @@ -37,7 +37,7 @@ from xen.util import asserts
     1.4  from xen.util.blkif import blkdev_uname_to_file
     1.5  from xen.util import security
     1.6  
     1.7 -from xen.xend import balloon, sxp, uuid, image, arch
     1.8 +from xen.xend import balloon, sxp, uuid, image, arch, osdep
     1.9  from xen.xend import XendRoot, XendNode, XendConfig
    1.10  
    1.11  from xen.xend.XendConfig import scrub_password
    1.12 @@ -1575,7 +1575,7 @@ class XendDomainInfo:
    1.13          else:
    1.14              # Boot using bootloader
    1.15              if not blexec or blexec == 'pygrub':
    1.16 -                blexec = '/usr/bin/pygrub'
    1.17 +                blexec = osdep.pygrub_path
    1.18  
    1.19              blcfg = None
    1.20              for (devtype, devinfo) in self.info.all_devices_sxpr():
     2.1 --- a/tools/python/xen/xend/osdep.py	Tue Jan 09 12:04:41 2007 +0000
     2.2 +++ b/tools/python/xen/xend/osdep.py	Tue Jan 09 13:24:40 2007 +0000
     2.3 @@ -29,8 +29,13 @@ import os
     2.4      "SunOS": False,
     2.5  }
     2.6  
     2.7 +_pygrub_path = {
     2.8 +    "SunOS": "/usr/lib/xen/bin/pygrub"
     2.9 +}
    2.10 +
    2.11  def _get(var, default=None):
    2.12      return var.get(os.uname()[0], default)
    2.13  
    2.14  scripts_dir = _get(_scripts_dir, "/etc/xen/scripts")
    2.15  xend_autorestart = _get(_xend_autorestart)
    2.16 +pygrub_path = _get(_pygrub_path, "/usr/bin/pygrub")