5 test -z "$1" && echo "Usage: $0 command id" && exit 1
7 if [ "$op" = "command" ] ; then
10 if [ $1 = '-M' ] ; then # FIXME --machine
15 for host in $(cat /etc/ganeti.hosts) ; do
18 test $show_machine && prefix="$host: "
19 #echo "# ssh $host $*"
20 ssh root@$host $* | sed "s/^/$prefix/"
24 elif [ "$op" = "copyfile" ] ; then
26 my_hostname=$(hostname -s)
27 for host in $(cat /etc/ganeti.hosts | grep -v $my_hostname) ; do
28 rsync $1 root@$host:$1
31 elif [ "$op" = "install" ] ; then # use as "install it" since needs install command and arg
33 ln -sfv `pwd`/gnt-cluster /usr/local/bin/
36 echo "UNKNOWN [$op] $*"