summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl/lib/Sys/Guestfs/Lib.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index 00a9bdb8..4020c244 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");
};