From d320785c4de455f0c53ce5d09a71f79c28e75692 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 1 Sep 2012 14:40:53 +0000 Subject: (mkinitrd) More logging on why initrd generation is skipped --- perl-install/bootloader.pm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'perl-install') 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(); -- cgit v1.2.1