From 6ed81258b0179d42e8c17232093a94ef32eeda6a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 5 Jul 2002 12:26:32 +0000 Subject: (merge_info_from_fstab): try to keep options from merged fstab IF the entry is for the same mountpoint AND the same device --- perl-install/fs.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'perl-install/fs.pm') 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); } -- cgit v1.2.1