From: John Levon Subject: [PATCH] Detect NetWare PV in pygrub Date: Wed, 11 Mar 2009 18:46:22 -0700 Message-ID: <602cae863715248763cb.1236822382@girltalk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User John Levon # Date 1236822370 25200 # Node ID 602cae863715248763cb78253eb4179908075bc5 # Parent 5d12838b642c29b35ef467cd059e6a568cd9a2f1 Detect NetWare PV in pygrub Signed-off-by: John Levon diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -578,6 +578,15 @@ def sniff_solaris(fs, cfg): return cfg +def sniff_netware(fs, cfg): + if not fs.file_exists("/nwserver/xnloader.sys"): + return cfg + + if not cfg["kernel"]: + cfg["kernel"] = "/nwserver/xnloader.sys" + + return cfg + if __name__ == "__main__": sel = None @@ -658,6 +667,9 @@ if __name__ == "__main__": chosencfg = sniff_solaris(fs, incfg) if not chosencfg["kernel"]: + chosencfg = sniff_netware(fs, incfg) + + if not chosencfg["kernel"]: chosencfg = run_grub(file, entry, fs, incfg["args"]) data = fs.open_file(chosencfg["kernel"]).read()