From 747e644ffd62c96ad9023dc4b09445d819c1d23b Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 23 Sep 2004 04:18:49 +0000 Subject: allow SYNC=no option in /etc/sysconfig/dynamic --- perl-install/standalone/drakupdate_fstab | 10 ++++++---- 1 file 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); -- cgit v1.2.1