diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-08-23 15:21:24 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-08-23 15:21:24 +0000 |
commit | 5160b680f37335147efd97ada3c868016db5f273 (patch) | |
tree | 7a07218b0a8d5bb5e33fa702266b256b557f1a8a /perl-install/fs.pm | |
parent | 22a6a8ec579c8108b37bccc44c18342f341cbfb9 (diff) | |
download | drakx-5160b680f37335147efd97ada3c868016db5f273.tar drakx-5160b680f37335147efd97ada3c868016db5f273.tar.gz drakx-5160b680f37335147efd97ada3c868016db5f273.tar.bz2 drakx-5160b680f37335147efd97ada3c868016db5f273.tar.xz drakx-5160b680f37335147efd97ada3c868016db5f273.zip |
keep the freq&passno of /etc/fstab
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r-- | perl-install/fs.pm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index d9bba4694..0a3e868bb 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -18,10 +18,10 @@ use loopback; sub read_fstab { - my ($file) = @_; + my ($file, $all_options) = @_; map { - my ($dev, $mntpoint, $type, $options) = split; + my ($dev, $mntpoint, $type, $options, $freq, $passno) = split; $options = 'defaults' if $options eq 'rw'; # clean-up for mtab read @@ -49,7 +49,7 @@ sub read_fstab { } } - { device => $dev, mntpoint => $mntpoint, type => $type, options => $options }; + { device => $dev, mntpoint => $mntpoint, type => $type, options => $options, if_($all_options, freq => $freq, passno => $passno) }; } cat_($file); } @@ -101,7 +101,7 @@ sub merge_info_from_mtab { sub merge_info_from_fstab { my ($fstab, $prefix, $uniq) = @_; - my @l = grep { !($uniq && fsedit::mntpoint2part($_->{mntpoint}, $fstab)) } read_fstab("$prefix/etc/fstab"); + my @l = grep { !($uniq && fsedit::mntpoint2part($_->{mntpoint}, $fstab)) } read_fstab("$prefix/etc/fstab", 'all_options'); merge_fstabs($fstab, @l); } @@ -110,7 +110,7 @@ sub write_fstab { $prefix ||= ''; my @l1 = (fsedit::get_really_all_fstab($all_hds), @{$all_hds->{special}}); - my @l2 = read_fstab("$prefix/etc/fstab"); + my @l2 = read_fstab("$prefix/etc/fstab", 'all_options'); my %new; my @l = map { @@ -128,6 +128,8 @@ sub write_fstab { my $mntpoint = loopback::carryRootLoopback($_) ? '/initrd/loopfs' : $_->{mntpoint}; my ($freq, $passno) = + exists $_->{freq} ? + ($_->{freq}, $_->{passno}) : isTrueFS($_) ? (1, $_->{mntpoint} eq '/' ? 1 : loopback::carryRootLoopback($_) ? 0 : 2) : (0, 0); @@ -373,7 +375,7 @@ sub get_raw_hds { detect_devices::floppies(), detect_devices::cdroms(), (map { $_->{device} .= '4'; $_ } detect_devices::zips()) ]; - my @fstab = read_fstab("$prefix/etc/fstab"); + my @fstab = read_fstab("$prefix/etc/fstab", 'all_options'); $all_hds->{nfss} = [ grep { isNfs($_) } @fstab ]; $all_hds->{smbs} = [ grep { isThisFs('smbfs', $_) } @fstab ]; $all_hds->{special} = [ |