summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2018-11-19 23:25:59 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2018-11-19 23:32:33 +0100
commit6a7b68fb08c2937e111777b720bcbc1a97b01984 (patch)
tree6abd433e7365326c1e100e80a633a2e271bd6b7a
parentb04a476869f9f93a62512c3035e7c0c283197c8b (diff)
downloaddrakx-6a7b68fb08c2937e111777b720bcbc1a97b01984.tar
drakx-6a7b68fb08c2937e111777b720bcbc1a97b01984.tar.gz
drakx-6a7b68fb08c2937e111777b720bcbc1a97b01984.tar.bz2
drakx-6a7b68fb08c2937e111777b720bcbc1a97b01984.tar.xz
drakx-6a7b68fb08c2937e111777b720bcbc1a97b01984.zip
(allowed_boot_disks) split it out
needed for next commit
-rw-r--r--perl-install/bootloader.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index fd2f85169..9b0c19ed8 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -789,13 +789,18 @@ Returns list of places where we can install the bootloader when not in UEFI mode
=cut
+sub allowed_boot_disks {
+ my ($all_hds) = @_;
+ # GPT disks w/o a BIOS boot partition do not have free space for grub2 to embed:
+ grep { c::get_disk_type($_->{file}) ne 'gpt' ||
+ any { isBIOS_GRUB($_) } map { partition_table::get_normal_parts($_) } $_;
+ } @{$all_hds->{hds}};
+}
+
sub allowed_boot_parts {
my ($bootloader, $all_hds) = @_;
(
- ( # GPT disks w/o a BIOS boot partition do not have free space for grub2 to embed:
- grep { c::get_disk_type($_->{file}) ne 'gpt' ||
- any { isBIOS_GRUB($_) } map { partition_table::get_normal_parts($_) } $_;
- } @{$all_hds->{hds}}), # MBR
+ allowed_boot_disks($all_hds), # MBR
if_($bootloader->{method} =~ /lilo/,
grep { $_->{level} eq '1' } @{$all_hds->{raids}}