[Pkg-libvirt-commits] [libguestfs] 46/59: v2v: efi: linux: Add support for grub2-efi.

Hilko Bengen bengen at moszumanska.debian.org
Sun May 3 21:26:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 9a45508f23451761fb3df825b17f2e32beb258d7
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu Apr 30 16:23:26 2015 +0100

    v2v: efi: linux: Add support for grub2-efi.
---
 v2v/convert_linux.ml | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
index 61a6a2a..a24a7fa 100644
--- a/v2v/convert_linux.ml
+++ b/v2v/convert_linux.ml
@@ -91,14 +91,20 @@ let rec convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source =
 
   (* What grub is installed? *)
   let grub_config, grub =
+    let locations = [
+      "/boot/grub2/grub.cfg", `Grub2;
+      "/boot/grub/menu.lst", `Grub1;
+      "/boot/grub/grub.conf", `Grub1;
+    ] in
+    let locations =
+      if inspect.i_uefi then
+        ("/boot/efi/EFI/redhat/grub.cfg", `Grub2) :: locations
+      else
+        locations in
     try
       List.find (
         fun (grub_config, _) -> g#is_file ~followsymlinks:true grub_config
-      ) [
-        "/boot/grub2/grub.cfg", `Grub2;
-        "/boot/grub/menu.lst", `Grub1;
-        "/boot/grub/grub.conf", `Grub1;
-      ]
+      ) locations
     with
       Not_found ->
         error (f_"no grub1/grub-legacy or grub2 configuration file was found") in

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list