summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index ed3bed4e1..2f502728f 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -349,7 +349,12 @@ sub write_fstab($;$$) {
require fsedit;
unshift @to_add,
- map {
+ grep {
+ my $b = !exists $new{$_->[0]} && !exists $new{$_->[1]};
+ #- keep in mind the new line for fstab.
+ @new{@$_[0,1]} = undef;
+ $b
+ } map {
my ($dir, $options, $freq, $passno) = qw(/dev/ defaults 0 0);
$options = $_->{options} || $options;
@@ -371,16 +376,12 @@ sub write_fstab($;$$) {
add_options($options, "loop") if isLoopback($_) && !isSwap($_); #- no need for loop option for swap files
- #- keep in mind the new line for fstab.
- @new{($_->{mntpoint}, $dev)} = undef;
-
eval { devices::make("$prefix/$dev") } if $dir && !isLoopback($_);
mkdir "$prefix/$_->{mntpoint}", 0755 if $_->{mntpoint} && !isSwap($_);
[ $dev, $_->{mntpoint}, type2fs($_->{type}), $options, $freq, $passno ];
- } grep { $_->{mntpoint} && type2fs($_->{type}) &&
- ! exists $new{$_->{mntpoint}} && ! exists $new{"/dev/$_->{device}"} } @$fstab;
+ } grep { $_->{mntpoint} && type2fs($_->{type}) } @$fstab;
push @to_add,
grep { !exists $new{$_->[0]} && !exists $new{$_->[1]} }
@@ -390,7 +391,6 @@ sub write_fstab($;$$) {
local *F;
open F, "> $prefix/etc/fstab" or die "error writing $prefix/etc/fstab";
print F join(" ", @$_), "\n" foreach sort { $a->[1] cmp $b->[1] } @to_add;
- log::l("fstab: ", join(" ", @$_)) foreach sort { $a->[1] cmp $b->[1] } @to_add;
}
sub merge_fstabs {