summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-07 10:37:19 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-07 10:37:19 +0000
commitbe53277f70946d12c4acba89d0b819bb21a0e0b1 (patch)
tree24ae1199b981f68d177eabaeeed45e254b47b0b9
parent3e2bd49f933ab33caa1d57cdb07c664aca0641e7 (diff)
downloaddrakx-be53277f70946d12c4acba89d0b819bb21a0e0b1.tar
drakx-be53277f70946d12c4acba89d0b819bb21a0e0b1.tar.gz
drakx-be53277f70946d12c4acba89d0b819bb21a0e0b1.tar.bz2
drakx-be53277f70946d12c4acba89d0b819bb21a0e0b1.tar.xz
drakx-be53277f70946d12c4acba89d0b819bb21a0e0b1.zip
(mkinitrd) do not crash if trying to build initrd from unknown
partitions (mga#4290)
-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 a61044a56..b9e9b9300 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -2,6 +2,7 @@
o support lxdm & slim too (#3715, Derek Jennings)
o install autologin for lxdm & slim too
- 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();