summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm17
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index b7b1d4c33..2f32baff5 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -110,10 +110,19 @@ 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
- || !-d "$::prefix/$dir";# dir doesn't exist (probably !mounted foreign part)
+ if ($::testing) {
+ log::l("Skipping initrd generation: testing mode");
+ return $initrd;
+ } elsif (-e "$::prefix/$initrd") {
+ log::l("Skipping initrd generation: already exists");
+ return $initrd;
+ } elsif ($initrd =~ /\(hd/) {
+ log::l("Skipping initrd generation: unrecognized partition");
+ return $initrd;
+ } elsif (!-d "$::prefix/$dir") {
+ log::l("Skipping initrd generation: dir doesn't exist (probably !mounted foreign part)");
+ return $initrd;
+ }
# for /boot on dos partitions when installing on loopback file on dos partition
my $loop_boot = fs::loopback::prepare_boot();