-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartrun.sh
More file actions
executable file
·49 lines (41 loc) · 884 Bytes
/
startrun.sh
File metadata and controls
executable file
·49 lines (41 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
set -eu
LOGDIR="out/" ;
usage () { # {{{
cat <<-USAGE
usage: $0 -i NODELIST -l SLICE [-t TIMEOUT]
will run the start script in each node in NODELIST. assumes deployment files
were copied in advance (e.g., with copy.sh). SLICE should be a planetlab slice
name (e.g., upmc_ts). TIMEOUT defaults to 30 seconds.
USAGE
exit 1
} # }}}
nodelist=invalid
slice=invalid
timeout=30
while getopts "i:l:t:h" OPTNAME ; do # {{{
case $OPTNAME in
i)
nodelist=$OPTARG
;;
l)
slice=$OPTARG
;;
t)
timeout=$OPTARG
;;
h|*)
usage
;;
esac
done
shift $(expr $OPTIND - 1)
OPTIND=1 # }}}
test $nodelist != invalid || usage
test $slice != invalid || usage
vxargs -pry -t $timeout -a $nodelist -o $LOGDIR/start/ \
ssh $slice@{} sudo /home/$slice/start
echo "# reporting errors:"
for file in $( ls $LOGDIR/start/*.err ) ; do
test ! -s $file || echo $(basename ${file%%.err})
done ;