Skip to content

Commit

Permalink
Change nodetool path to under releases/<RELEASE_VERSION>/
Browse files Browse the repository at this point in the history
  • Loading branch information
shino committed Jun 8, 2013
1 parent 65b4800 commit eafc1bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion priv/templates/simplenode.reltool.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{overlay, [
{mkdir, "log/sasl"},
{copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
{copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
{copy, "files/nodetool", "releases/\{\{rel_vsn\}\}/nodetool"},
{copy, "files/{{nodeid}}", "bin/{{nodeid}}"},
{copy, "files/{{nodeid}}.cmd", "bin/{{nodeid}}.cmd"},
{copy, "files/start_erl.cmd", "bin/start_erl.cmd"},
Expand Down
13 changes: 7 additions & 6 deletions priv/templates/simplenode.runner
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/runner_script.data" ]; then
fi

if [ -z "$RUNNER_SCRIPT_DATA" ]; then
echo "normal release"
ROOTDIR=$RUNNER_BASE_DIR
ERTS_PATH=$RUNNER_BASE_DIR/erts-$ERTS_VSN/bin
NODETOOL="$ERTS_PATH/escript $ERTS_PATH/nodetool $NAME_ARG $COOKIE_ARG"
if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/nodetool" ]; then
NODETOOL="$ERTS_PATH/escript $RUNNER_BASE_DIR/releases/$APP_VSN/nodetool $NAME_ARG $COOKIE_ARG"
else
NODETOOL="$ERTS_PATH/escript $ERTS_PATH/nodetool $NAME_ARG $COOKIE_ARG"
fi
SLIM_ARGS=
elif [ "$RUNNER_SCRIPT_DATA" = "slim" ]; then
echo "slim release"
# Setup system paths
SYSTEM_ERL_PATH=`which erl`
if [ ! -x "$SYSTEM_ERL_PATH" ]; then
Expand All @@ -128,15 +130,14 @@ elif [ "$RUNNER_SCRIPT_DATA" = "slim" ]; then
unset SYSTEM_ERL_PATH
unset SYSTEM_HOME_BIN

# Setup nodetool path. Is it nice to place nodetool script under releases?
LOCAL_ERTS_PATH=$RUNNER_BASE_DIR/erts-$ERTS_VSN/bin
NODETOOL="$ERTS_PATH/escript $LOCAL_ERTS_PATH/nodetool $NAME_ARG $COOKIE_ARG"
NODETOOL="$ERTS_PATH/escript $RUNNER_BASE_DIR/releases/$APP_VSN/nodetool $NAME_ARG $COOKIE_ARG"
unset LOCAL_ERL_PATH

# Setup additional arguments for slim release
SLIM_ARGS="-boot_var RELTOOL_EXT_LIB $RUNNER_BASE_DIR/lib -sasl releases_dir \"$RUNNER_BASE_DIR/releases\""
else
echo "unknown runner_script.data"
echo "Unknown runner_script.data"
exit 1
fi

Expand Down

0 comments on commit eafc1bd

Please sign in to comment.