#!/bin/bash
#
# client_command
#
# script to execute a command on every node in the cluster
# list of nodes is in /etc/nodes
#
# author : Jacek Radajewski (jacek@usq.edu.au)
#

if [ $(/bin/uname -n) != "topcat.eng.usq.edu.au" ] ; then
    echo "$0 : I must be started from node1.beowulf.usq.edu.au"
    echo "$0 : I was started from $(/bin/uname -n)"
    exit 1
fi


for hostname in $(cat /etc/nodes); do
    /usr/bin/rsh $hostname -n $1
done

