From: Matthew Booth Date: Thu, 27 May 2010 14:47:50 +0000 (+0100) Subject: Rely on new augeas lens for modules.conf and conf.modules X-Git-Tag: 1.2.9~13 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=159b1167eb8b1cc6b7b26809c65451cc937aea13;p=libguestfs.git 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 (cherry picked from commit 245ed4b8eb076a8c4cc5787f49d21c4f68630f9f) --- diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 4305b19..85c4790 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -1802,13 +1802,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