Commit 03f556b1 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Some small change to copy off the ir, ns, ptop, and top file to

a safe place in /usr/testbeb/expinfo for archival purposes.
parent 62024122
......@@ -820,10 +820,6 @@ close IRFILE;
# available, reserve them, and call postassign to copy the data into the
# DB.
if ($verbose != 1) {
unlink $topfile;
}
print "Assignment complete\n";
0;
......@@ -26,6 +26,7 @@ my $optlist = "b";
my $TB = "@prefix@";
my $DBNAME = "@TBDBNAME@";
my $TBOPS = "@TBOPSEMAIL@";
my $TBINFO = "$TB/expinfo";
my $tbdir = "$TB/bin/";
my $projroot = "/proj";
......@@ -92,6 +93,8 @@ my $nsfile = "$eid.ns";
my $irfile = "$eid.ir";
my $repfile = "$eid.report";
my $tempns = "$tempfile.$$";
my $user_name = "Startexp Script";
my $user_email = "$TBOPS";
#
# Set up for querying the database.
......@@ -228,6 +231,7 @@ if (system("$tbdir/tbreport -v $pid $eid $irfile 2>&1 > $repfile") != 0) {
#
if ($batch) {
system("$tbdir/tbreport -v $pid $eid $irfile");
print STDOUT "\n\n";
}
#
......@@ -257,6 +261,20 @@ $expt_expires = $row[2];
print STDOUT "Setup Success\n";
#
# Try to copy off the files for testbed information gathering
#
my $infodir = "$pid-$eid-" . `date +20%y%m%d-%H.%M.%S`;
if ($infodir =~ /^([-\@\w.]+)$/) {
$infodir = $1;
if (mkdir("$TBINFO/$infodir", 0770)) {
system("cp $nsfile $irfile $TBINFO/$infodir");
system("cp *.ptop *.top $TBINFO/$infodir");
}
}
#
# In batch mode, just exit without sending email. Remove tempns file!
#
......
......@@ -46,7 +46,7 @@ else {
$prefix = &tbs_prefix($nsfile);
$irfile = "$prefix.ir";
$logfile = "$prefix.log";
$ptopfile = "testbed$$.ptop";
$ptopfile = "$$.ptop";
$id = "$pid-$eid";
$tbcmdfile = "tbcmds";
......@@ -190,8 +190,6 @@ if (&tbs_exec("handle_os $irfile $tbcmdfile")) {
exit(1);
}
unlink $ptopfile;
&tbs_out("Pre run finished - " . &ctime(time) . "\n");
0;
......
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