From f0f366d517c87f347f889394416ea21289eec83f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 9 Feb 2000 21:05:34 +0000 Subject: no_comment --- perl-install/fs.pm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'perl-install/fs.pm') 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; } -- cgit v1.2.1