summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/fs.pm20
-rw-r--r--perl-install/install2.pm4
-rw-r--r--perl-install/install_any.pm6
-rw-r--r--perl-install/install_steps.pm2
4 files changed, 23 insertions, 9 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 465f522ef..25252d64a 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -335,10 +335,13 @@ sub df {
}
#- do some stuff before calling write_fstab
-sub write($$$$) {
- my ($prefix, $fstab, $manualFstab, $useSupermount) = @_;
+sub write {
+ my ($prefix, $fstab, $manualFstab, $useSupermount, $options) = @_;
$fstab = [ @{$fstab||[]}, @{$manualFstab||[]} ];
+ use Data::Dumper;
+ print Dumper $options;
+
unless ($::live) {
log::l("resetting /etc/mtab");
local *F;
@@ -370,20 +373,25 @@ sub write($$$$) {
[ "/mnt/zip$i", "/mnt/zip$i", "supermount", "fs=vfat,dev=/dev/zip$i", 0, 0 ] :
[ "/dev/zip$i", "/mnt/zip$i", "auto", "user,noauto,nosuid,exec,nodev", 0, 0 ];
} detect_devices::zips()));
- write_fstab($fstab, $prefix, @to_add);
+ write_fstab($fstab, $prefix, $options, @to_add);
}
sub write_fstab($;$$) {
- my ($fstab, $prefix, @to_add) = @_;
+ my ($fstab, $prefix, $options, @to_add) = @_;
$prefix ||= '';
+ my $format_options = sub {
+ my ($default, @l) = @_;
+ join(',', $default, map { "$_=$options->{$_}" } grep { $options->{$_} } @l);
+ };
+
unshift @to_add, map {
my ($dir, $options, $freq, $passno) = qw(/dev/ defaults 0 0);
$options = $_->{options} || $options;
isTrueFS($_) and ($freq, $passno) = (1, ($_->{mntpoint} eq '/') ? 1 : 2);
- isNfs($_) and $dir = '', $options = $_->{options} || 'ro,nosuid,rsize=8192,wsize=8192';
- isFat($_) and $options = $_->{options} || "user,exec,umask=0";
+ isNfs($_) and $dir = '', $options = $_->{options} || $format_options->('ro,nosuid,rsize=8192,wsize=8192', 'iocharset');
+ isFat($_) and $options = $_->{options} || $format_options->("user,exec,umask=0", 'codepage', 'iocharset');
isReiserfs($_) && $_ == fsedit::get_root($fstab, 'boot') and add_options($options, "notail");
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 9be58979a..437d90b2c 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -321,7 +321,7 @@ sub configureX {
my ($clicked) = @_;
#- done here and also at the end of install2.pm, just in case...
- fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}, $o->{useSupermount});
+ install_any::write_fstab($o);
modules::write_conf($o->{prefix});
require pkgs;
@@ -581,7 +581,7 @@ sub main {
install_any::ejectCdrom();
install_any::remove_advertising($o);
- $::live or fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}, $o->{useSupermount});
+ install_any::write_fstab($o);
modules::write_conf($o->{prefix});
#- to ensure linuxconf doesn't cry against those files being in the future
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 04faa525d..56a2ab548 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -880,4 +880,10 @@ sub disable_user_view {
substInFile { s/^Browser=.*/Browser=0/ } "$prefix/etc/X11/gdm/gdm.conf";
}
+sub write_fstab {
+ my ($o) = @_;
+ fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}, $o->{useSupermount}, lang::fs_options($o->{lang}));
+}
+
+
1;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 3267adedb..06e3a53bd 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -293,7 +293,7 @@ sub beforeInstallPackages {
}
#- some packages need such files for proper installation.
- $::live or fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}, $o->{useSupermount});
+ install_any::write_fstab($o);
require network;
network::add2hosts("$o->{prefix}/etc/hosts", "localhost.localdomain", "127.0.0.1");