Skip to contentSkip to conversation

Detect NetWare PV in pygrub

PATCH New John Levon 1 participant 1 message Mar 12, 2009

lore
Share & tools
lore

John Levon

author
#0 lore raw

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

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()