Commit c36cdc96 authored by Mike Hibler's avatar Mike Hibler
Browse files

More anti-NFS code.

If NOSHAREDFS is defined, don't export /share to nodes in exports.head.
parent fb528ba4
......@@ -31,6 +31,7 @@ my $ELABINELAB = @ELABINELAB@;
my $WINSUPPORT = @WINSUPPORT@;
my $QUOTA_FSLIST= '@FS_WITH_QUOTAS@';
my $SCRATCHDIR = '@FSDIR_SCRATCH@';
my $NOSHAREDFS = @NOSHAREDFS@;
#
# Fixed paths for clients
......@@ -381,14 +382,17 @@ Phase "exports", "Setting up exports", sub {
# /share is special. We want to export to boss/ops read-write,
# but to the control network read-only.
#
my ($a,$b,$c,$d) = ($CONTROL_NETWORK =~ /^(\d*)\.(\d*)\.(\d*)\.(\d*)/);
my $realdir = `realpath $SHAREROOT`;
chomp($realdir);
push(@exports_lines,
"$realdir\t$BOSSNODE $USERNODE -maproot=root");
push(@exports_lines,
"$realdir\t-network ${a}.${b}.${c} -mask $CONTROL_NETMASK ".
"-maproot=root -ro -alldirs");
if (!$NOSHAREDFS) {
my ($a,$b,$c,$d) =
($CONTROL_NETWORK =~ /^(\d*)\.(\d*)\.(\d*)\.(\d*)/);
push(@exports_lines,
"$realdir\t-network ${a}.${b}.${c} ".
"-mask $CONTROL_NETMASK -maproot=root -ro -alldirs");
}
#
# Put them in exports.head, and copy that to /etc/exports
......
......@@ -45,6 +45,7 @@ my $QUOTA_FSLIST= '@FS_WITH_QUOTAS@';
my $ETCDIR = "$PREFIX/etc";
my $LIBDIR = "$PREFIX/lib";
my $SCRATCHDIR = '@FSDIR_SCRATCH@';
my $NOSHAREDFS = @NOSHAREDFS@;
my $OUTER_BOSS = '@OUTERBOSS_NODENAME@';
if ($OUTER_BOSS eq '')
{ $OUTER_BOSS = "www.emulab.net"; }
......@@ -770,15 +771,17 @@ Phase "exports", "Setting up exports", sub {
# /share is special. We want to export to boss read-write,
# but to the control network read-only.
#
my ($a,$b,$c,$d) =
($CONTROL_NETWORK =~ /^(\d*)\.(\d*)\.(\d*)\.(\d*)/);
my $realdir = `realpath $SHAREROOT`;
chomp($realdir);
push(@exports_lines,
"$realdir\t$BOSSNODE -maproot=root");
push(@exports_lines,
"$realdir\t-network ${a}.${b}.${c} -mask $CONTROL_NETMASK ".
"-maproot=root -ro -alldirs");
if (!$NOSHAREDFS) {
my ($a,$b,$c,$d) =
($CONTROL_NETWORK =~ /^(\d*)\.(\d*)\.(\d*)\.(\d*)/);
push(@exports_lines,
"$realdir\t-network ${a}.${b}.${c} ".
"-mask $CONTROL_NETMASK -maproot=root -ro -alldirs");
}
}
#
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment