ia64/xen-unstable

changeset 19337:fd1bbce5d533

pygrub: Detect NetWare PV in pygrub

Signed-off-by: John Levon <john.levon@sun.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Mar 12 11:10:22 2009 +0000 (2009-03-12)
parents 1e9342bc6d6e
children 55652fa65974
files tools/pygrub/src/pygrub
line diff
     1.1 --- a/tools/pygrub/src/pygrub	Thu Mar 12 11:09:57 2009 +0000
     1.2 +++ b/tools/pygrub/src/pygrub	Thu Mar 12 11:10:22 2009 +0000
     1.3 @@ -583,6 +583,15 @@ def sniff_solaris(fs, cfg):
     1.4  
     1.5      return cfg
     1.6   
     1.7 +def sniff_netware(fs, cfg):
     1.8 +    if not fs.file_exists("/nwserver/xnloader.sys"):
     1.9 +        return cfg
    1.10 +
    1.11 +    if not cfg["kernel"]:
    1.12 +        cfg["kernel"] = "/nwserver/xnloader.sys"
    1.13 +
    1.14 +    return cfg
    1.15 +
    1.16  if __name__ == "__main__":
    1.17      sel = None
    1.18      
    1.19 @@ -663,6 +672,9 @@ if __name__ == "__main__":
    1.20      chosencfg = sniff_solaris(fs, incfg)
    1.21  
    1.22      if not chosencfg["kernel"]:
    1.23 +        chosencfg = sniff_netware(fs, incfg)
    1.24 +
    1.25 +    if not chosencfg["kernel"]:
    1.26          chosencfg = run_grub(file, entry, fs, incfg["args"])
    1.27  
    1.28      data = fs.open_file(chosencfg["kernel"]).read()