On Thu, Oct 27, 2016 at 08:22:30PM +0300, Pavel Butsykin wrote:
match typ with
| Grub1 ->
- if config_file = "/boot/efi/EFI/redhat/grub.conf" then
- g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf";
-
+ (match inspect.i_firmware with
+ | I_BIOS -> ()
+ | I_UEFI _ -> g#aug_transform "grub" config_file
+ );
new bootloader_grub1 g inspect config_file
| Grub2 -> new bootloader_grub2 g config_file
I don't think this part of the patch is correct. We need to use the
Augeas transform only for a particular path which is missing from the
Augeas lens.
What do you think of the attached version instead? It's smaller and
more efficient (only makes 2 libguestfs API calls in the normal case)?
I'm still running tests on it.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v