summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-11 18:25:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-11 18:25:48 +0000
commitf26011903cf11a33656c023a2367d643ed09d88b (patch)
tree548a3ec969a51578d3bb39719c6b7804542750d4 /perl-install/fs.pm
parent08135ef65a4f8d3e3c5ccf4707f4199d335eeaa9 (diff)
downloaddrakx-backup-do-not-use-f26011903cf11a33656c023a2367d643ed09d88b.tar
drakx-backup-do-not-use-f26011903cf11a33656c023a2367d643ed09d88b.tar.gz
drakx-backup-do-not-use-f26011903cf11a33656c023a2367d643ed09d88b.tar.bz2
drakx-backup-do-not-use-f26011903cf11a33656c023a2367d643ed09d88b.tar.xz
drakx-backup-do-not-use-f26011903cf11a33656c023a2367d643ed09d88b.zip
(prepare_write_fstab): no need to read the fstab once again before writing since reading takes care of everything, including unknown entries (which go to {special}). This fixes a bug when removing existing partition with associated mount point. It used to keep the entry in fstab, which is wrong (as reported by andré <naderrt@wanadoo.fr>)
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm14
1 files changed, 2 insertions, 12 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 63e03f542..4ebf33f37 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -196,17 +196,7 @@ sub prepare_write_fstab {
my ($all_hds, $prefix, $keep_smb_credentials) = @_;
$prefix ||= '';
- my @l1 = (fsedit::get_really_all_fstab($all_hds), @{$all_hds->{special}});
- my @l2 = read_fstab($prefix, "/etc/fstab", 'all_options');
-
- {
- #- remove entries from @l2 that are given by @l1
- #- this is needed to allow to unset a mount point
- my %new;
- $new{$_->{device}} = 1 foreach @l1;
- delete $new{none}; #- special case for device "none" which can be _mounted_ more than once
- @l2 = grep { !$new{$_->{device}} } @l2;
- }
+ my @l_in = (fsedit::get_really_all_fstab($all_hds), @{$all_hds->{special}});
my %new;
my @smb_credentials;
@@ -270,7 +260,7 @@ sub prepare_write_fstab {
} else {
()
}
- } grep { $_->{device} && ($_->{mntpoint} || $_->{real_mntpoint}) && $_->{type} } (@l1, @l2);
+ } grep { $_->{device} && ($_->{mntpoint} || $_->{real_mntpoint}) && $_->{type} } @l_in;
join('', map { $_->[1] } sort { $a->[0] cmp $b->[0] } @l), \@smb_credentials;
}