summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-02-09 21:05:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-02-09 21:05:34 +0000
commitf0f366d517c87f347f889394416ea21289eec83f (patch)
tree6960d14189bc35bf920f037fe2d43433f945fdf3 /perl-install/fs.pm
parentda93dce60a01e338efbea41e3e2134d9c1e03fe2 (diff)
downloaddrakx-backup-do-not-use-f0f366d517c87f347f889394416ea21289eec83f.tar
drakx-backup-do-not-use-f0f366d517c87f347f889394416ea21289eec83f.tar.gz
drakx-backup-do-not-use-f0f366d517c87f347f889394416ea21289eec83f.tar.bz2
drakx-backup-do-not-use-f0f366d517c87f347f889394416ea21289eec83f.tar.xz
drakx-backup-do-not-use-f0f366d517c87f347f889394416ea21289eec83f.zip
no_comment
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index c3f960cd8..390221732 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -284,17 +284,14 @@ sub write_fstab($;$$) {
} grep { isFat($_) &&
! exists $new{"/dev/$_->{device}"} } @$fstab;
- my @current = cat_("$prefix/etc/fstab");
+ push @to_add,
+ sort { $a->[1] cmp $b->[1] }
+ grep { !exists $new{$_->[0]} && !exists $new{$_->[1]} }
+ map { [ split ] } cat_("$prefix/etc/fstab");
log::l("writing $prefix/etc/fstab");
local *F;
open F, "> $prefix/etc/fstab" or die "error writing $prefix/etc/fstab";
- foreach (@current) {
- my ($a, $b) = split;
- #- if we find one line of fstab containing either the same device or mntpoint, do not write it
- exists $new{$a} || exists $new{$b} and next;
- print F $_;
- }
print F join(" ", @$_), "\n" foreach @to_add;
}