X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=perl%2Flib%2FSys%2FGuestfs%2FLib.pm;h=4020c24480e810615cecf50976668e3cab8b9365;hp=00a9bdb87a8891787ed47bc1db9b124812d4252e;hb=a82bfb88e553c6626c99757779f9b500664409ba;hpb=549bba81e739ab10d8013c9ca88ce70b0ddda8e4 diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 00a9bdb..4020c24 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -1307,10 +1307,10 @@ sub _check_for_initrd my $version = $1; my @modules; - # Disregard old-style compressed ext2 files, since cpio - # takes ages to (fail to) process these. - if ($g->file ("/boot/$initrd") !~ /gzip compressed/ || - $g->zfile ("gzip", "/boot/$initrd") !~ /ext2 filesystem/) { + # Disregard old-style compressed ext2 files and only + # work with real compressed cpio files, since cpio + # takes ages to (fail to) process anything else. + if ($g->file ("/boot/$initrd") =~ /cpio/) { eval { @modules = $g->initrd_list ("/boot/$initrd"); };