summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-05 12:26:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-05 12:26:32 +0000
commit6ed81258b0179d42e8c17232093a94ef32eeda6a (patch)
tree54be9f01406538d106bd8ba049954b20dc1e97b9
parent8f864558a144c9994f3d0131096bbd7e26147704 (diff)
downloaddrakx-6ed81258b0179d42e8c17232093a94ef32eeda6a.tar
drakx-6ed81258b0179d42e8c17232093a94ef32eeda6a.tar.gz
drakx-6ed81258b0179d42e8c17232093a94ef32eeda6a.tar.bz2
drakx-6ed81258b0179d42e8c17232093a94ef32eeda6a.tar.xz
drakx-6ed81258b0179d42e8c17232093a94ef32eeda6a.zip
(merge_info_from_fstab): try to keep options from merged fstab IF the entry is for the same mountpoint AND the same device
-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);
}