summaryrefslogtreecommitdiffstats
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
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)
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/bootloader.pm3
2 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index bb647641c..4b707de47 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -3,6 +3,7 @@
o install autologin for lxdm & slim too
- drakauth: don't update UsePAM option in sshd configuration
- drakboot:
+ o do not crash if trying to build initrd from unknown partitions (mga#4290)
o install acpi & acpid at once
- drakxservices:
o when listing services ensure disabled services that can be enabled are
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();