added copyfile
[gnt-info] / emulator / gnt-cluster
1 #!/bin/sh -e
2
3 op=$1 ; shift
4
5 if [ "$op" = "command" ] ; then
6
7         show_machine=0
8         if [ $1 = '-M' ] ; then # FIXME --machine
9                 shift
10                 show_machine=1
11         fi
12
13         for host in lib10 lib15 lib20 ; do
14
15                 prefix=''
16                 test $show_machine && prefix="$host: "
17                 #echo "# ssh $host $*"
18                 ssh $host $* | sed "s/^/$prefix/"
19
20         done
21
22 elif [ "$op" = "copyfile" ] ; then
23
24         scp $1 lib10:$1
25         scp $1 lib20:$1
26
27 else
28         echo "UNKNOWN [$op] $*"
29         exit 1
30 fi