diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-03-13 11:36:03 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-03-13 11:36:03 +0000 |
commit | 2dd04e7992014e0240f4ebd5e1f8cc7db94df000 (patch) | |
tree | cea4f6a7d036c526e87b3cff6bc3bb961a827239 | |
parent | 6a72c4dceb2224ab1de62ebbf1e47c3849802436 (diff) | |
download | drakx-2dd04e7992014e0240f4ebd5e1f8cc7db94df000.tar drakx-2dd04e7992014e0240f4ebd5e1f8cc7db94df000.tar.gz drakx-2dd04e7992014e0240f4ebd5e1f8cc7db94df000.tar.bz2 drakx-2dd04e7992014e0240f4ebd5e1f8cc7db94df000.tar.xz drakx-2dd04e7992014e0240f4ebd5e1f8cc7db94df000.zip |
don't die when we have no entries in grub menu.lst
-rw-r--r-- | perl-install/bootloader.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 73f93cb3f..759b4833b 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -245,8 +245,10 @@ 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}; + if (@{$b{entries}}) { + $b{default} = min($b{default}, scalar(@{$b{entries}}) - 1); + $b{default} = $b{entries}[$b{default}]{label}; + } $b{method} = 'grub'; \%b; |