#!/bin/sh -e op=$1 ; shift test -z "$1" && exit 1 if [ "$op" = "command" ] ; then show_machine=0 if [ $1 = '-M' ] ; then # FIXME --machine shift show_machine=1 fi for host in lib10 lib15 lib20 ; do prefix='' test $show_machine && prefix="$host: " #echo "# ssh $host $*" ssh $host $* | sed "s/^/$prefix/" done elif [ "$op" = "copyfile" ] ; then rsync $1 lib10:$1 rsync $1 lib20:$1 elif [ "$op" = "install" ] ; then # use as "install it" since needs install command and arg ln -sfv `pwd`/gnt-cluster /usr/local/bin/ else echo "UNKNOWN [$op] $*" exit 1 fi