summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 641d8bc9b..d70480d2c 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -132,7 +132,7 @@ sub merge_info_from_fstab {
merge_fstabs($fstab, @l);
}
-sub write_fstab {
+sub fstab_to_string {
my ($all_hds, $prefix) = @_;
$prefix ||= '';
@@ -188,8 +188,13 @@ sub write_fstab {
}
} grep { $_->{device} && ($_->{mntpoint} || $_->{real_mntpoint}) && $_->{type} } (@l1, @l2);
+ join('', map { join(' ', @$_) . "\n" } sort { $a->[1] cmp $b->[1] } @l);
+}
+
+sub write_fstab {
+ my ($all_hds, $prefix) = @_;
log::l("writing $prefix/etc/fstab");
- output("$prefix/etc/fstab", map { join(' ', @$_) . "\n" } sort { $a->[1] cmp $b->[1] } @l);
+ output("$prefix/etc/fstab", fstab_to_string($all_hds, $prefix));
}
sub auto_fs() {