Skip to content

Commit

Permalink
'riak attach -f': Enable attaching to the node without pinging it
Browse files Browse the repository at this point in the history
  • Loading branch information
Tryn Mirell committed Jun 13, 2012
1 parent 168c2ae commit 73f836c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions rel/files/riak
Expand Up @@ -210,12 +210,16 @@ case "$1" in
;;

attach)
# Make sure a node IS running
RES=`ping_node`
ES=$?
if [ "$ES" -ne 0 ]; then
echo "Node is not running!"
exit $ES
if [[ $2 == "-f" ]]; then
echo "Forcing connection..."
else
# Make sure a node is running
RES=`ping_node`
ES=$?
if [ "$ES" -ne 0 ]; then
echo "Node is not running!"
exit $ES
fi
fi

shift
Expand Down

0 comments on commit 73f836c

Please sign in to comment.