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

Minor change to help batch system; wrap the startcmd the user provided

so that it issues exit status via startcmddone. User does not need to
do this, which Eric says is less error prone!
parent dcef9e0f
......@@ -44,6 +44,7 @@ proc tb-set-noshaping {link onoff} {}
proc tb-set-useveth {link onoff} {}
proc tb-set-allowcolocate {lanlink onoff} {}
proc tb-set-colocate-factor {factor} {}
proc tb-set-node-startcmd {node cmd} {}
Class Program
......
......@@ -638,10 +638,13 @@ proc tb-set-sync-server {node} {
# command above, but we have to keep that one around for a while. This
# new version dispatched to the node object, which uses a program object.
#
proc tb-set-node-startcommand {node command} {
proc tb-set-node-startcmd {node command} {
if {[$node info class] != "Node"} {
perror "\[tb-set-node-startcommand] $node is not a node."
perror "\[tb-set-node-startcmd] $node is not a node."
return
}
return [$node start-command $command]
set command "($command ; /usr/local/etc/emulab/batchcmddone \$?)"
set newprog [$node start-command $command]
return $newprog
}
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