diff options
Diffstat (limited to 'perl-install/bootloader.pm')
-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; |