aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--priv/templates/extended_bin.dtl11
-rw-r--r--priv/templates/nodetool.dtl2
-rw-r--r--src/rlx_prv_assembler.erl8
3 files changed, 13 insertions, 8 deletions
diff --git a/priv/templates/extended_bin.dtl b/priv/templates/extended_bin.dtl
index bfdc132..8bb3b48 100644
--- a/priv/templates/extended_bin.dtl
+++ b/priv/templates/extended_bin.dtl
@@ -32,9 +32,12 @@ relx_rem_sh() {
# transparently
id="remsh$(relx_gen_id)-${NAME}"
+ # Get the node's ticktime so that we use the same thing.
+ TICKTIME="$(relx_nodetool rpcterms net_kernel get_net_ticktime)"
+
# Setup remote shell command to control node
exec "$BINDIR/erl" "$NAME_TYPE" "$id" -remsh "$NAME" -boot start_clean \
- -setcookie "$COOKIE"
+ -setcookie "$COOKIE" -kernel net_ticktime $TICKTIME
}
# Generate a random id
@@ -46,7 +49,7 @@ relx_gen_id() {
relx_nodetool() {
command="$1"; shift
"$ERTS_DIR/bin/escript" "$ROOTDIR/bin/nodetool" "$NAME_TYPE" "$NAME" \
- -setcookie "$COOKIE" "$command"
+ -setcookie "$COOKIE" "$command" $@
}
# Output a start command for the last argument of run_erl
@@ -140,6 +143,8 @@ case "$1" in
# echo "Node is already running!"
# exit 1
#fi
+ # Save this for later.
+ CMD=$1
case "$1" in
start)
shift
@@ -159,7 +164,7 @@ case "$1" in
[ "$RUN_PARAM" ] && set -- "$@" "$RUN_PARAM"
# Export the HEART_COMMAND
- HEART_COMMAND="$@"
+ HEART_COMMAND="$RELEASE_ROOT_DIR/bin/$REL_NAME $CMD"
export HEART_COMMAND
mkdir -p "$PIPE_DIR"
diff --git a/priv/templates/nodetool.dtl b/priv/templates/nodetool.dtl
index 80f1965..2f46395 100644
--- a/priv/templates/nodetool.dtl
+++ b/priv/templates/nodetool.dtl
@@ -42,7 +42,7 @@ main(Args) ->
_ ->
halt(1)
end;
- ["rpcterms", Module, Function, ArgsAsString] ->
+ ["rpcterms", Module, Function | ArgsAsString] ->
case rpc:call(TargetNode, list_to_atom(Module), list_to_atom(Function),
consult(ArgsAsString), 60000) of
{badrpc, Reason} ->
diff --git a/src/rlx_prv_assembler.erl b/src/rlx_prv_assembler.erl
index bc4e606..f34dfa6 100644
--- a/src/rlx_prv_assembler.erl
+++ b/src/rlx_prv_assembler.erl
@@ -101,7 +101,7 @@ print_dev_mode(State) ->
-spec create_output_dir(file:name()) ->
ok | {error, Reason::term()}.
create_output_dir(OutputDir) ->
- case filelib:is_dir(OutputDir) of
+ case ec_file:is_dir(OutputDir) of
false ->
case rlx_util:mkdir_p(OutputDir) of
ok ->
@@ -169,7 +169,7 @@ remove_symlink_or_directory(TargetDir) ->
true ->
ec_file:remove(TargetDir);
false ->
- case filelib:is_dir(TargetDir) of
+ case ec_file:is_dir(TargetDir) of
true ->
ok = ec_file:remove(TargetDir, [recursive]);
false ->
@@ -204,7 +204,7 @@ copy_directory(AppDir, TargetDir, IncludeSrc) ->
copy_dir(AppDir, TargetDir, SubDir) ->
SubSource = filename:join(AppDir, SubDir),
SubTarget = filename:join(TargetDir, SubDir),
- case filelib:is_dir(SubSource) of
+ case ec_file:is_dir(SubSource) of
true ->
ok = rlx_util:mkdir_p(SubTarget),
case ec_file:copy(SubSource, SubTarget, [recursive]) of
@@ -371,7 +371,7 @@ include_erts(State, Release, OutputDir, RelDir) ->
ErtsDir = filename:join([Prefix, "erts-" ++ ErtsVersion]),
LocalErts = filename:join([OutputDir, "erts-" ++ ErtsVersion]),
{OsFamily, _OsName} = os:type(),
- case filelib:is_dir(ErtsDir) of
+ case ec_file:is_dir(ErtsDir) of
false ->
?RLX_ERROR({specified_erts_does_not_exist, ErtsVersion});
true ->