git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
216557b
)
Don't die during inspection if initrd doesn't exist
author
Matthew Booth
<mbooth@redhat.com>
Wed, 21 Apr 2010 14:39:48 +0000
(15:39 +0100)
committer
Richard Jones
<rjones@redhat.com>
Wed, 21 Apr 2010 15:51:20 +0000
(16:51 +0100)
This fixes a problem where inspection would die if grub.conf referenced a
non-existent initrd. Just return an empty initrd instead.
perl/lib/Sys/Guestfs/Lib.pm
patch
|
blob
|
history
diff --git
a/perl/lib/Sys/Guestfs/Lib.pm
b/perl/lib/Sys/Guestfs/Lib.pm
index
5428b10
..
b5b3906
100644
(file)
--- a/
perl/lib/Sys/Guestfs/Lib.pm
+++ b/
perl/lib/Sys/Guestfs/Lib.pm
@@
-1825,7
+1825,7
@@
sub _inspect_initrd
# 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
($path) =~ /cpio/) {
+ if ($g->
exists($path) && $g->file
($path) =~ /cpio/) {
eval {
@modules = $g->initrd_list ($path);
};