From d23d3f83976f6cf5678f270009488e09c4b8c51c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 27 Feb 2003 19:16:21 +0000 Subject: - add get_info_from_fstab() - use it when reading existing fstab (to get for example devfs mount) --- perl-install/fs.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'perl-install/fs.pm') 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 ||= ''; -- cgit v1.2.1