summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-09-01 14:40:53 +0000
committerColin Guthrie <colin@mageia.org>2012-09-01 14:40:53 +0000
commitd320785c4de455f0c53ce5d09a71f79c28e75692 (patch)
tree6cf12558b912947aae00019f69564c8bf0283310
parentadbee14303bfa3998c514caf35ec550ee515d5ea (diff)
downloaddrakx-d320785c4de455f0c53ce5d09a71f79c28e75692.tar
drakx-d320785c4de455f0c53ce5d09a71f79c28e75692.tar.gz
drakx-d320785c4de455f0c53ce5d09a71f79c28e75692.tar.bz2
drakx-d320785c4de455f0c53ce5d09a71f79c28e75692.tar.xz
drakx-d320785c4de455f0c53ce5d09a71f79c28e75692.zip
(mkinitrd) More logging on why initrd generation is skipped
-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();