#!/bin/sh # # Copyright (c) 2006 University of Utah and the Flux Group. # # {{{EMULAB-LICENSE # # This file is part of the Emulab network testbed software. # # This file is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at # your option) any later version. # # This file is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public # License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this file. If not, see . # # }}} # waitfor="-w" agent="" usage() { echo "Usage: stop-run [-nfp] pid eid" echo " -n do not wait for completion" echo " -f run on fake plab nodes" echo " -p run on real plab nodes (default)" exit 1 } args=`getopt fnp $*` if [ $? -ne 0 ]; then usage fi set -- $args for i; do case "$i" in -n) waitfor= shift;; -f) agent="_fake" shift;; -p) agent="" shift;; --) shift break;; esac done if [ $# -lt 2 ]; then usage fi P=$1 E=$2 exec tevc $waitfor -e $P/$E now stop$agent run exit $?