[Libguestfs] [PATCH 4/8] GuestOS: Don't error if initrd doesn't exist before running mkinitrd
Matthew Booth
mbooth at redhat.com
Wed May 19 16:50:36 UTC 2010
---
lib/Sys/VirtV2V/GuestOS/RedHat.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
index 2fe4640..a5dc1cc 100644
--- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm
+++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
@@ -1453,7 +1453,7 @@ sub prepare_bootable
$initrd = $self->{desc}->{boot}->{grub_fs}.$initrd;
# Backup the original initrd
- $g->mv("$initrd", "$initrd.pre-v2v");
+ $g->mv($initrd, "$initrd.pre-v2v") if ($g->exists($initrd));
# Create a new initrd which probes the required kernel modules
my @module_args = ();
--
1.6.6.1
More information about the Libguestfs
mailing list