summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-09-23 04:18:49 +0000
committerOlivier Blin <oblin@mandriva.org>2004-09-23 04:18:49 +0000
commit747e644ffd62c96ad9023dc4b09445d819c1d23b (patch)
tree01d1f98c622e4ca718db7c1b11a4f819dee1d1d9 /perl-install/standalone
parentd48fdd4895695ba097412865784081f3343b8816 (diff)
downloaddrakx-747e644ffd62c96ad9023dc4b09445d819c1d23b.tar
drakx-747e644ffd62c96ad9023dc4b09445d819c1d23b.tar.gz
drakx-747e644ffd62c96ad9023dc4b09445d819c1d23b.tar.bz2
drakx-747e644ffd62c96ad9023dc4b09445d819c1d23b.tar.xz
drakx-747e644ffd62c96ad9023dc4b09445d819c1d23b.zip
allow SYNC=no option in /etc/sysconfig/dynamic
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakupdate_fstab10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/standalone/drakupdate_fstab b/perl-install/standalone/drakupdate_fstab
index 938800437..fde9fa585 100755
--- a/perl-install/standalone/drakupdate_fstab
+++ b/perl-install/standalone/drakupdate_fstab
@@ -103,7 +103,7 @@ sub device_name_to_entry {
}
sub set_options {
- my ($part, $useSupermount) = @_;
+ my ($part, $useSupermount, $o_sync) = @_;
$part->{is_removable} = 1; #- force removable flag
fs::mount_options::set_default($part,
@@ -112,6 +112,7 @@ sub set_options {
lang::fs_options(lang::read()));
my ($options, $unknown) = fs::mount_options::unpack($part);
+ $options->{sync} = $o_sync if defined($o_sync);
$options->{kudzu} = 1 if !$no_flag;
fs::mount_options::pack($part, $options, $unknown);
}
@@ -159,10 +160,11 @@ sub main {
print STDERR "Already in fstab\n" if $::testing;
return;
}
- my $useSupermount = ${{ getVarsFromSh('/etc/sysconfig/dynamic') }}{SUPERMOUNT} eq 'yes' ? 'magicdev' : '';
- set_options($part, $useSupermount);
+ my %dynamic = getVarsFromSh('/etc/sysconfig/dynamic');
+ my $useSupermount = $dynamic{SUPERMOUNT} eq 'yes' ? 'magicdev' : '';
+ set_options($part, $useSupermount, to_bool($dynamic{SYNC} ne 'no'));
set_mount_point($part, $fstab) or return;
-
+
my ($line) = fs::prepare_write_fstab([$part]);
if ($line) {
append_to_file($fstab_file, $line);