From 245ed4b8eb076a8c4cc5787f49d21c4f68630f9f Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Thu, 27 May 2010 15:47:50 +0100 Subject: [PATCH] Rely on new augeas lens for modules.conf and conf.modules Latest augeas includes a lens for /etc/modules.conf. If this new lens is present, the code to force the Modprobe lens to try to match /etc/modules.conf as well results in /etc/modules.conf not being parsed at all. This results in modprobe_aliases in virt-inspector output being empty. This change is equivalent to change cfd28d1140393667913689b7b9bcf21c8bfe592c from virt-v2v. An effect of this change is that the Modules_conf augeas lens is now required for correct operation on guests which use /etc/modules.conf. Fixes RHBZ#596776 --- perl/lib/Sys/Guestfs/Lib.pm | 7 ------- 1 file changed, 7 deletions(-) diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 2c5c837..128f7c9 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -1820,13 +1820,6 @@ sub _find_modprobe_aliases # Initialise augeas $g->aug_init("/", 16); - # Register additional paths to the Modprobe lens - $g->aug_set("/augeas/load/Modprobe/incl[last()+1]", "/etc/modules.conf"); - $g->aug_set("/augeas/load/Modprobe/incl[last()+1]", "/etc/conf.modules"); - - # Make augeas reload - $g->aug_load(); - my %modprobe_aliases; for my $pattern qw(/files/etc/conf.modules/alias -- 1.8.3.1