From 4cf1767ecded952cbbd9d8f4d05012ff71c099af Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 17 Sep 2001 20:31:06 +0000 Subject: - '--' to separate options for supermount + small workaround (ro and exec before --) - fix nfs in manualFstab (for auto_installs, reported by David Eastcott) --- perl-install/fs.pm | 17 ++++++++--------- perl-install/fsedit.pm | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 13bcf8471..726f8041c 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -34,6 +34,8 @@ sub read_fstab { } elsif (/dev=(.*)/) { $dev = $1; 0; + } elsif ($_ eq '--') { + 0; } else { 1; } @@ -85,8 +87,8 @@ sub add2all_hds { foreach (@l) { my $s = - isNfs($_) ? 'nfs' : - isThisFs('smbfs', $_) ? 'smb' : + isNfs($_) ? 'nfss' : + isThisFs('smbfs', $_) ? 'smbs' : 'special'; push @{$all_hds->{$s}}, $_; } @@ -170,7 +172,10 @@ sub write_fstab { # handle bloody supermount special case if ($options =~ /supermount/) { - $options = join(",", "dev=$dev", "fs=$type", grep { $_ ne 'supermount' } split(',', $options)); + my @l = grep { $_ ne 'supermount' } split(',', $options); + my @l1 = grep { member($_, 'ro', 'exec') } @l; + my @l2 = difference2(\@l, \@l1); + $options = join(",", "dev=$dev", "fs=$type", @l1, if_(@l2, '--', @l2)); ($dev, $type) = ($mntpoint, 'supermount'); } @@ -362,12 +367,6 @@ sub set_default_options { $options->{user} = 0; } - if ($options->{supermount}) { - #- drives supermount crazy :'-( - delete $options->{'codepage='}; - delete $options->{'iocharset='}; - } - # have noauto when we have user $options->{noauto} = 1 if $options->{user}; diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index d715262c9..6800fd9a4 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -76,7 +76,7 @@ sub typeOfPart { #- Functions #-###################################################################################### sub empty_all_hds { - { hds => [], lvms => [], raids => [], loopbacks => [], raw_hds => [], nfss => [], smbs => [] }; + { hds => [], lvms => [], raids => [], loopbacks => [], raw_hds => [], nfss => [], smbs => [], special => [] }; } sub recompute_loopbacks { my ($all_hds) = @_; -- cgit v1.2.1