summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index e6a50a6e0..3fbf1e33c 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -175,7 +175,16 @@ sub merge_info_from_mtab {
sub merge_info_from_fstab {
my ($fstab, $prefix, $uniq) = @_;
- my @l = grep { !($uniq && fsedit::mntpoint2part($_->{mntpoint}, $fstab)) } read_fstab($prefix, "/etc/fstab", 'all_options');
+
+ my @l = grep {
+ if ($uniq) {
+ my $part = fsedit::mntpoint2part($_->{mntpoint}, $fstab);
+ !$part || fsedit::is_same_hd($part, $_); #- keep it only if it is the mountpoint AND the same device
+ } else {
+ 1;
+ }
+ } read_fstab($prefix, "/etc/fstab", 'all_options');
+
merge_fstabs($fstab, @l);
}