diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-06-17 13:02:00 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-06-17 13:02:00 +0100 |
commit | 3ce334a9d7c4c400fb684b2b916ad2034ef3eb17 (patch) | |
tree | d6bc855d9cebed65b72e6086b1e9db78740e15df /perl-install | |
parent | a297a63cce4b8845b10f3f3a31be91ed9ed43378 (diff) | |
download | drakx-3ce334a9d7c4c400fb684b2b916ad2034ef3eb17.tar drakx-3ce334a9d7c4c400fb684b2b916ad2034ef3eb17.tar.gz drakx-3ce334a9d7c4c400fb684b2b916ad2034ef3eb17.tar.bz2 drakx-3ce334a9d7c4c400fb684b2b916ad2034ef3eb17.tar.xz drakx-3ce334a9d7c4c400fb684b2b916ad2034ef3eb17.zip |
Don't use swap on other devices when installing on a removable device (and vice versa).
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/fs/partitioning.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/fs/partitioning.pm b/perl-install/fs/partitioning.pm index b93d146b2..18fa7e114 100644 --- a/perl-install/fs/partitioning.pm +++ b/perl-install/fs/partitioning.pm @@ -5,12 +5,14 @@ use strict; use common; use fs::format; +use fs::get; use fs::type; sub guess_partitions_to_format { my ($fstab) = @_; + my $root_part = fs::get::root($fstab); foreach (@$fstab) { - $_->{mntpoint} = "swap" if isSwap($_); + $_->{mntpoint} = "swap" if isSwap($_) && ($_->{rootDevice} eq $root_part->{rootDevice} || !$_->{is_removable} && !$root_part->{is_removable}); $_->{mntpoint} or next; add2hash_($_, { toFormat => $_->{notFormatted} }) if $_->{fs_type}; #- eg: do not set toFormat for isRawRAID (0xfd) |