Skip to content

make-automaps: add -vers=4.0 to all nfs mounts #69

Merged
merged 1 commit into from
Jan 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions make-automaps/make-automaps
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ sub convert_map {
sub parse_jbod_line {
my ($in,$source)=@_;
if ($in=~m"^(X\d+)\s+host==([^;]+);type:=link;fs:=/amd/\2/X/\1 host!=\2;type:=nfs;rhost:=\2;fs:=/amd/\2/x/\1;rfs:=/amd/\2/X/\1$") {
return "$1 $2:/amd/$2/X/$1";
return "$1 -vers=4.0 $2:/amd/$2/X/$1";
} elsif ($in=~m"^(C\d+)\s+host==([^;]+);type:=link;fs:=/amd/\2/C/\1 host!=\2;type:=nfs;rhost:=\2;fs:=/amd/\2/c/\1;rfs:=/amd/\2/C/\1$") {
return "$1 $2:/amd/$2/C/$1";
return "$1 -vers=4.0 $2:/amd/$2/C/$1";
} elsif ($in=~m"^(M\d+)\s+host==([^;]+);type:=link;fs:=/amd/\2/M/\1 host!=\2;type:=nfs;rhost:=\2;fs:=/amd/\2/m/\1;rfs:=/amd/\2/M/\1$") {
return "$1 $2:/amd/$2/M/$1";
return "$1 -vers=4.0 $2:/amd/$2/M/$1";
} elsif ($in=~m"^(X\d+)\s+-fs:=/amd/([^/]+)/X/\1 host==\2;type:=link host!=\2;type:=nfs;rhost:=\2") {
return "$1 $2:/amd/$2/X/$1";
return "$1 -vers=4.0 $2:/amd/$2/X/$1";
} else {
warn "?? $source : $_ ??";
}
Expand Down Expand Up @@ -68,8 +68,8 @@ sub parse_map_line {
return ();
}

sub parse_subkey_line { my ($key,$host,$fs)=parse_map_line(@_); return $key ? "$key $host:$fs/$key" : undef; }
sub parse_nosubkey_line { my ($key,$host,$fs)=parse_map_line(@_); return $key ? "$key $host:$fs" : undef; }
sub parse_subkey_line { my ($key,$host,$fs)=parse_map_line(@_); return $key ? "$key -vers=4.0 $host:$fs/$key" : undef; }
sub parse_nosubkey_line { my ($key,$host,$fs)=parse_map_line(@_); return $key ? "$key -vers=4.0 $host:$fs" : undef; }

sub create_pkg_map {
my $cache;
Expand All @@ -82,7 +82,7 @@ sub create_pkg_map {
/\S/ or next;
my ($pkg,$flags)=split ' ';
my $local="/var/pkg/$pkg";
my $rw = $flags eq 'BUILD' ? ' -rw' : '';
my $rw = $flags eq 'BUILD' ? ' -vers=4.0,rw' : ' -vers=4.0';
if (-d $local) {
print $out "$pkg$rw :$local\n";
} else {
Expand Down