[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 1/2] 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 files changed, 0 insertions(+), 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.7.0.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]