diff options
author | Zhigang Wang <zhigang.x.wang@oracle.com> | 2012-07-09 10:19:15 +0100 |
---|---|---|
committer | Zhigang Wang <zhigang.x.wang@oracle.com> | 2012-07-09 10:19:15 +0100 |
commit | 4ce7e30e6abe5a3101c24920d2ed8e9acd5b21a5 (patch) | |
tree | b670d4f39c3069dcbe47b6af7d35ad14d8975e54 | |
parent | 8b56609962c45064ec6e3d223c5724cc4a1e2d48 (diff) | |
download | xen-4ce7e30e6abe5a3101c24920d2ed8e9acd5b21a5.tar.gz xen-4ce7e30e6abe5a3101c24920d2ed8e9acd5b21a5.tar.bz2 xen-4ce7e30e6abe5a3101c24920d2ed8e9acd5b21a5.zip |
tools/pygrub: fix solaris kernel sniff
Solaris 11 build 163+ removes '/platform/i86xpv/kernel/unix' and only
the
64-bit PV kernel file '/platform/i86xpv/kernel/amd64/unix' exists.
This patch fixes the detection.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Frank Che <frank.che@oracle.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 23686:7c39a2c0d870
xen-unstable date: Thu Jul 14 18:09:58 2011 +0100
-rw-r--r-- | tools/pygrub/src/pygrub | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index 041630ed7a..17c00833e6 100644 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -604,7 +604,8 @@ def supports64bitPVguest(): # If nothing has been specified, look for a Solaris domU. If found, perform the # necessary tweaks. def sniff_solaris(fs, cfg): - if not fs.file_exists("/platform/i86xpv/kernel/unix"): + if not fs.file_exists("/platform/i86xpv/kernel/unix") and \ + not fs.file_exists("/platform/i86xpv/kernel/amd64/unix"): return cfg if not cfg["kernel"]: @@ -612,9 +613,11 @@ def sniff_solaris(fs, cfg): fs.file_exists("/platform/i86xpv/kernel/amd64/unix"): cfg["kernel"] = "/platform/i86xpv/kernel/amd64/unix" cfg["ramdisk"] = "/platform/i86pc/amd64/boot_archive" - else: + elif fs.file_exists("/platform/i86xpv/kernel/unix"): cfg["kernel"] = "/platform/i86xpv/kernel/unix" cfg["ramdisk"] = "/platform/i86pc/boot_archive" + else: + return cfg # Unpleasant. Typically we'll have 'root=foo -k' or 'root=foo /kernel -k', # and we need to maintain Xen properties (root= and ip=) and the kernel |