diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-09-23 04:18:49 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-09-23 04:18:49 +0000 |
commit | 747e644ffd62c96ad9023dc4b09445d819c1d23b (patch) | |
tree | 01d1f98c622e4ca718db7c1b11a4f819dee1d1d9 /perl-install/standalone/drakupdate_fstab | |
parent | d48fdd4895695ba097412865784081f3343b8816 (diff) | |
download | drakx-backup-do-not-use-747e644ffd62c96ad9023dc4b09445d819c1d23b.tar drakx-backup-do-not-use-747e644ffd62c96ad9023dc4b09445d819c1d23b.tar.gz drakx-backup-do-not-use-747e644ffd62c96ad9023dc4b09445d819c1d23b.tar.bz2 drakx-backup-do-not-use-747e644ffd62c96ad9023dc4b09445d819c1d23b.tar.xz drakx-backup-do-not-use-747e644ffd62c96ad9023dc4b09445d819c1d23b.zip |
allow SYNC=no option in /etc/sysconfig/dynamic
Diffstat (limited to 'perl-install/standalone/drakupdate_fstab')
-rwxr-xr-x | perl-install/standalone/drakupdate_fstab | 10 |
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); |