#!/bin/bash
#
# client_command
#
# script to execute a command on every node in the cluster
# list of nodes is in /etc/nodes
#

if [ $(/bin/uname -n) != "abel.microway.com" ] ; then
    echo "$0 : I must be started from abel.microway.com"
    echo "$0 : I was started from $(/bin/uname -n)"
    exit 1
fi


for hostname in $(cat /etc/nodes); do
    echo -n "${hostname}:  " && /usr/bin/rsh -n $hostname $*
done

