-# This function executes the command sent through parameters to host
-# parameters
-# 1. hostname
-# 2. command to be executed on host
-custom_remote_shell () {
- host=$1
- shift
- cmds="$*"
- here=`pwd`
- # Hop on to the remote node, chdir to 'here' and run the given
- # commands. One of the following will probably work.
- ssh $host "cd $here; $cmds"
- #rsh $host "cd $here; $cmds"
- # we have to remove the leading `uname -n`: from pdsh output lines
- #pdsh -w $host "cd $here; $cmds" | sed 's/^[^:]*://'
-}