summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-27 19:27:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-27 19:27:35 +0000
commit82fd4fe1e4a5de7b1b16adbdd4939fab633772e6 (patch)
treea7a174fce2123a11c7dc9bf06f3eb86748724f3f /perl-install
parent13960f2b7428d0098b9798cbf4f0684d481c2409 (diff)
downloaddrakx-backup-do-not-use-82fd4fe1e4a5de7b1b16adbdd4939fab633772e6.tar
drakx-backup-do-not-use-82fd4fe1e4a5de7b1b16adbdd4939fab633772e6.tar.gz
drakx-backup-do-not-use-82fd4fe1e4a5de7b1b16adbdd4939fab633772e6.tar.bz2
drakx-backup-do-not-use-82fd4fe1e4a5de7b1b16adbdd4939fab633772e6.tar.xz
drakx-backup-do-not-use-82fd4fe1e4a5de7b1b16adbdd4939fab633772e6.zip
new function fstab_to_string
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() {