summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-13 10:35:31 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-13 10:35:31 +0000
commit3c622e904357321ff6ffc0bf09d7338941243318 (patch)
tree1507fb00403389daaa43b9c7875d8e45ce2b7c88 /perl-install/bootloader.pm
parent5da3e03b6834eab76caa97b84cdb0e787bc2ba7f (diff)
downloaddrakx-3c622e904357321ff6ffc0bf09d7338941243318.tar
drakx-3c622e904357321ff6ffc0bf09d7338941243318.tar.gz
drakx-3c622e904357321ff6ffc0bf09d7338941243318.tar.bz2
drakx-3c622e904357321ff6ffc0bf09d7338941243318.tar.xz
drakx-3c622e904357321ff6ffc0bf09d7338941243318.zip
(mkinitrd) do not crash if a foreign partition is not mounted (mga#6966)
(backported from trunk)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm4
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();