Commit 2f5f6da6 authored by Timothy Stack's avatar Timothy Stack

Only send separate nfs mail if its the main installation, put it in

the swap log otherwise.
parent 54230b6f
...@@ -34,6 +34,7 @@ sub usage() ...@@ -34,6 +34,7 @@ sub usage()
my $TBROOT = "@prefix@"; my $TBROOT = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@"; my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@"; my $TBLOGS = "@TBLOGSEMAIL@";
my $THISHOMEBASE = "@THISHOMEBASE@";
my $TESTMODE = @TESTMODE@; my $TESTMODE = @TESTMODE@;
my $DISABLE_EVENTS = "@DISABLE_EVENT_SCHED@"; my $DISABLE_EVENTS = "@DISABLE_EVENT_SCHED@";
my $piper = "$TBROOT/sbin/locpiper"; my $piper = "$TBROOT/sbin/locpiper";
...@@ -397,13 +398,18 @@ sub doSwapout($) { ...@@ -397,13 +398,18 @@ sub doSwapout($) {
print "Getting files accessed via NFS.\n"; print "Getting files accessed via NFS.\n";
TBDebugTimeStamp("nfstrace started"); TBDebugTimeStamp("nfstrace started");
my ($dbuid, $uname, $umail); if (lc $THISHOMEBASE eq "emulab.net") {
if (UNIX2DBUID($UID, \$dbuid) && my ($dbuid, $uname, $umail);
UserDBInfo($dbuid, \$uname, \$umail)) { if (UNIX2DBUID($UID, \$dbuid) &&
SENDMAIL("$TBLOGS", UserDBInfo($dbuid, \$uname, \$umail)) {
"Files accessed by $pid/$eid via NFS", SENDMAIL("$TBLOGS",
`nfstrace get $pid $eid`, "Files accessed by $pid/$eid via NFS",
"$uname <$umail>"); `nfstrace get $pid $eid`,
"$uname <$umail>");
}
}
else {
system("nfstrace get $pid $eid");
} }
TBDebugTimeStamp("nfstrace finished"); TBDebugTimeStamp("nfstrace finished");
......
Markdown is supported
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