diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-08-07 10:37:22 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-08-07 10:37:22 +0000 |
commit | 72e2ba82d4489c381bc1424779fc54517f4dc5f4 (patch) | |
tree | 40ac80f484f1b08b113cc659066903e18aab7b2e | |
parent | be53277f70946d12c4acba89d0b819bb21a0e0b1 (diff) | |
download | drakx-72e2ba82d4489c381bc1424779fc54517f4dc5f4.tar drakx-72e2ba82d4489c381bc1424779fc54517f4dc5f4.tar.gz drakx-72e2ba82d4489c381bc1424779fc54517f4dc5f4.tar.bz2 drakx-72e2ba82d4489c381bc1424779fc54517f4dc5f4.tar.xz drakx-72e2ba82d4489c381bc1424779fc54517f4dc5f4.zip |
(mkinitrd) do not crash if a foreign partition is not mounted (mga#6966)
-rw-r--r-- | perl-install/bootloader.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index fedb4a15e..62a046fe9 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -109,9 +109,11 @@ sub get_label { sub mkinitrd { my ($kernel_version, $bootloader, $entry, $initrd) = @_; + my $dir = dirname($initrd); return $initrd if $::testing # testing mode || -e "$::prefix/$initrd" # already exists - || $initrd =~ /\(hd/; # unrecognized partition + || $initrd =~ /\(hd/ # unrecognized partition + || !-d $dir; # dir doesn't exist (probably !mounted foreign part) # for /boot on dos partitions when installing on loopback file on dos partition my $loop_boot = fs::loopback::prepare_boot(); |