Commit 80a67b46 authored by Leigh Stoller's avatar Leigh Stoller

Add batchcmddone script for batchers to use to report exit status of

their per-node batch command jobs. Termination of batch jobs does not
happen until all nodes have reported status.
parent b1b6ee4a
......@@ -69,6 +69,7 @@ common-script-install: dir-install vnodesetup
$(INSTALL) -m 755 $(SRCDIR)/update $(BINDIR)/update
$(INSTALL) -m 755 vnodesetup $(BINDIR)/vnodesetup
$(INSTALL) -m 755 $(SRCDIR)/bootvnodes $(BINDIR)/bootvnodes
$(INSTALL) -m 755 $(SRCDIR)/batchcmddone $(BINDIR)/batchcmddone
local-script-install: common-script-install
$(INSTALL) -m 755 $(SRCDIR)/bootsetup $(BINDIR)/bootsetup
......
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
# Report that batch command for this node is done. Report status.
#
sub usage()
{
print "Usage: batchcmddone <status>\n";
exit(1);
}
my $stat;
# Drag in path stuff so we can find emulab stuff.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use libsetup;
usage()
if (@ARGV != 1);
$stat = $ARGV[0];
# Sanity Check
if ($stat =~ /^(\d*)$/) {
$stat = $1;
}
else {
print "*** $0:\n" .
" WARNING: Invalid exit status $stat. Reporting default.\n";
$stat = 666;
}
#
# Then invoke the bootsetup routine in the library. All the work happens
# in there.
#
startcmdstatus($stat);
exit 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