Detect NetWare PV in pygrub
PATCH 1/1 Detect NetWare PV in pygrub
# HG changeset patch
# User John Levon <[email protected]>
# Date 1236822370 25200
# Node ID 602cae863715248763cb78253eb4179908075bc5 # Parent 5d12838b642c29b35ef467cd059e6a568cd9a2f1 Detect NetWare PV in pygrub
Signed-off-by John Levon <[email protected]>
tools/pygrub/src/pygrub +12 -0
@@ -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()