From 82fd4fe1e4a5de7b1b16adbdd4939fab633772e6 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 27 Jan 2002 19:27:35 +0000 Subject: new function fstab_to_string --- perl-install/fs.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'perl-install') 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() { -- cgit v1.2.1