Permalink
Browse files

Check that ~/.hosts.erlang exists in start_nodes.sh

  • Loading branch information...
1 parent f156a8f commit f89c2bf6d781fb868ceb2fd260a885398757350e Ville Tuulos committed Dec 17, 2008
Showing with 12 additions and 2 deletions.
  1. +12 −2 start_nodes.sh
View
@@ -5,15 +5,25 @@ if [ -z $1 ]; then
exit 1
fi
+if [ ! -e ~/.hosts.erlang ]; then
+ echo -e "\nYou don't seem to have an existing ~/.hosts.erlang file."
+ echo "This file is required and it should contain a list of all possible hostnames"
+ echo -e "that can contain active nodes in the ring. At the bare minimum, you can say:\n"
+ echo -e "echo \"'localhost'.\" > ~/.hosts.erlang\n"
+ echo "if you have only one node that is your localhost. See 'man 3erl net_adm' for"
+ echo -e "further information about the .hosts.erlang file.\n"
+ exit 1
+fi
+
if [ -z $RIBGO_ROOT ]; then
RINGO_ROOT=$(cd `dirname $0`; pwd)
fi
echo "RINGO_ROOT is $RINGO_ROOT"
-for id in `ssh $1 "ls -1 $3"`
+for id in `ssh $1 "ls -1 $2"`
do
echo "Starting ringo-$id"
- ssh $1 "$RINGO_ROOT/ring/start_ringo.sh $3/$id"
+ ssh $1 "$RINGO_ROOT/ring/start_ringo.sh $2/$id"
sleep 1
done

0 comments on commit f89c2bf

Please sign in to comment.