summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-20 10:13:43 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-20 10:13:43 +0000
commitd9d77adaae12631847ff1a95409a5a758aca3193 (patch)
tree202401b8ea8e57ad093c69ae4cb45a232b7d79db /perl-install/bootloader.pm
parentea483315f8086a40f0e7585f66903b151cecb367 (diff)
downloaddrakx-backup-do-not-use-d9d77adaae12631847ff1a95409a5a758aca3193.tar
drakx-backup-do-not-use-d9d77adaae12631847ff1a95409a5a758aca3193.tar.gz
drakx-backup-do-not-use-d9d77adaae12631847ff1a95409a5a758aca3193.tar.bz2
drakx-backup-do-not-use-d9d77adaae12631847ff1a95409a5a758aca3193.tar.xz
drakx-backup-do-not-use-d9d77adaae12631847ff1a95409a5a758aca3193.zip
workaround buggy installkernel that left default value be geater than
the current number of entries, thus making drakboot displaying (default-entries_count) spurious "()*" entries which then results in writing back bogus grub conf file. kernel team should just be shuted down :-(
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 48acb42da..af23e2de3 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -132,6 +132,8 @@ sub read_grub() {
}
$b{nowarn} = 1;
+ # handle broken installkernel -r:
+ $b{default} = min($b{default}, scalar(@{$b{entries}}) -1);
$b{default} = $b{entries}[$b{default}]{label};
\%b;