From b0472581f467472c7e473bf892f6ec1184218182 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 16 Jun 2020 16:40:48 +0100 Subject: Ignore swap on other devices when suggesting partitions on removable device. --- perl-install/fsedit.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install/fsedit.pm') diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 684d802d7..fc979ce87 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -402,7 +402,8 @@ sub suggest_part { my $hd = fs::get::part2hd($part, $all_hds); my $hd_size = $hd && $hd->{totalsectors}; # nb: no $hd if $part is /dev/mdX - my $has_swap = any { isSwap($_) } fs::get::fstab($all_hds); + my @fstab = $hd->{is_removable} ? partition_table::get_normal_parts($hd) : fs::get::fstab($all_hds); + my $has_swap = any { isSwap($_) } @fstab; my @local_suggestions = grep { $::auto_install || !$_->{mntpoint} && !$_->{VG_name} || !fs::get::has_mntpoint($_->{mntpoint}, $all_hds) || isSwap($_) && !$has_swap } -- cgit v1.2.1