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
commit7101f32c6cf4176dceffad87560bad256d09bbd1 (patch)
tree07ff524f29e7d0d68eca1c4306dc6fec252f57c7
parente4595b3677bcb5607db2cf7d2cdbbe014f4b6374 (diff)
downloaddrakx-backup-do-not-use-7101f32c6cf4176dceffad87560bad256d09bbd1.tar
drakx-backup-do-not-use-7101f32c6cf4176dceffad87560bad256d09bbd1.tar.gz
drakx-backup-do-not-use-7101f32c6cf4176dceffad87560bad256d09bbd1.tar.bz2
drakx-backup-do-not-use-7101f32c6cf4176dceffad87560bad256d09bbd1.tar.xz
drakx-backup-do-not-use-7101f32c6cf4176dceffad87560bad256d09bbd1.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();