diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-02-27 19:16:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-02-27 19:16:21 +0000 |
commit | d23d3f83976f6cf5678f270009488e09c4b8c51c (patch) | |
tree | 210fc14b0816b0ec6061590d327437de80047ac8 /perl-install | |
parent | 7cbd70aa1989af49648687e0724092fe58f135b1 (diff) | |
download | drakx-backup-do-not-use-d23d3f83976f6cf5678f270009488e09c4b8c51c.tar drakx-backup-do-not-use-d23d3f83976f6cf5678f270009488e09c4b8c51c.tar.gz drakx-backup-do-not-use-d23d3f83976f6cf5678f270009488e09c4b8c51c.tar.bz2 drakx-backup-do-not-use-d23d3f83976f6cf5678f270009488e09c4b8c51c.tar.xz drakx-backup-do-not-use-d23d3f83976f6cf5678f270009488e09c4b8c51c.zip |
- add get_info_from_fstab()
- use it when reading existing fstab (to get for example devfs mount)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/fs.pm | 10 | ||||
-rw-r--r-- | perl-install/install_any.pm | 5 | ||||
-rwxr-xr-x | perl-install/standalone/diskdrake | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 8e63218d9..a8d07edb2 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -142,8 +142,9 @@ sub add2all_hds { isThisFs('nfs', $_) ? 'nfss' : isThisFs('smbfs', $_) ? 'smbs' : isThisFs('davfs', $_) ? 'davs' : + isTrueFS($_) || isSwap($_) || isOtherAvailableFS($_) ? '' : 'special'; - push @{$all_hds->{$s}}, $_; + push @{$all_hds->{$s}}, $_ if $s; } } @@ -194,6 +195,13 @@ sub merge_info_from_fstab { merge_fstabs($loose, $fstab, @l); } +# - when using "$loose", it does not merge in type&options from the fstab +sub get_info_from_fstab { + my ($all_hds, $prefix) = @_; + my @l = read_fstab($prefix, "/etc/fstab", 'keep_freq_passno'); + add2all_hds($all_hds, @l) +} + sub prepare_write_fstab { my ($fstab, $prefix, $keep_smb_credentials) = @_; $prefix ||= ''; diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index b29cf48b5..cdfb7e19b 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -980,12 +980,11 @@ sub find_root_parts { } sub use_root_part { my ($all_hds, $part, $prefix) = @_; - my $fstab = [ fsedit::get_really_all_fstab($all_hds) ]; { my $handle = any::inspect($part, $prefix) or die; - fs::merge_info_from_fstab($fstab, $handle->{dir}, 'uniq'); + fs::get_info_from_fstab($all_hds, $handle->{dir}, 'uniq'); } - map { $_->{mntpoint} = 'swap' } grep { isSwap($_) } @$fstab; #- use all available swap. + map { $_->{mntpoint} = 'swap' } grep { isSwap($_) } fsedit::get_really_all_fstab($all_hds); #- use all available swap. } sub getHds { diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index 24f20061f..54dbd7f75 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -75,7 +75,7 @@ $SIG{__DIE__} = sub { my $m = chomp_($_[0]); log::l("ERROR: $m") }; fs::get_raw_hds('', $all_hds); -fs::merge_info_from_fstab([ fsedit::get_really_all_fstab($all_hds) ], ''); +fs::get_info_from_fstab($all_hds, ''); fs::merge_info_from_mtab([ fsedit::get_really_all_fstab($all_hds) ], ''); $all_hds->{current_fstab} = fs::fstab_to_string($all_hds, ''); |