summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--priv/templates/simplenode.reltool.config2
-rwxr-xr-xpriv/templates/simplenode.runner13
2 files changed, 8 insertions, 7 deletions
diff --git a/priv/templates/simplenode.reltool.config b/priv/templates/simplenode.reltool.config
index bac7270..eae8ab3 100644
--- a/priv/templates/simplenode.reltool.config
+++ b/priv/templates/simplenode.reltool.config
@@ -32,7 +32,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, "{{nodeid}}/bin/start_clean.boot",
"\{\{erts_vsn\}\}/bin/start_clean.boot"},
{copy, "files/{{nodeid}}", "bin/{{nodeid}}"},
diff --git a/priv/templates/simplenode.runner b/priv/templates/simplenode.runner
index 1f8c5e7..595a1ea 100755
--- a/priv/templates/simplenode.runner
+++ b/priv/templates/simplenode.runner
@@ -136,13 +136,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
@@ -155,15 +157,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