summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-13 10:35:28 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-13 10:35:28 +0000
commit5da3e03b6834eab76caa97b84cdb0e787bc2ba7f (patch)
tree07ff524f29e7d0d68eca1c4306dc6fec252f57c7 /perl-install/bootloader.pm
parentbcc72a8b65862a30e89700f47ee95064b3167a6d (diff)
downloaddrakx-5da3e03b6834eab76caa97b84cdb0e787bc2ba7f.tar
drakx-5da3e03b6834eab76caa97b84cdb0e787bc2ba7f.tar.gz
drakx-5da3e03b6834eab76caa97b84cdb0e787bc2ba7f.tar.bz2
drakx-5da3e03b6834eab76caa97b84cdb0e787bc2ba7f.tar.xz
drakx-5da3e03b6834eab76caa97b84cdb0e787bc2ba7f.zip
(mkinitrd) do not crash if trying to build initrd from unknown
partitions (mga#4290) (backported from trunk)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 4d71798f6..fedb4a15e 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -110,7 +110,8 @@ sub mkinitrd {
my ($kernel_version, $bootloader, $entry, $initrd) = @_;
return $initrd if $::testing # testing mode
- || -e "$::prefix/$initrd"; # already exists
+ || -e "$::prefix/$initrd" # already exists
+ || $initrd =~ /\(hd/; # unrecognized partition
# for /boot on dos partitions when installing on loopback file on dos partition
my $loop_boot = fs::loopback::prepare_boot();