Skip to content

Commit

Permalink
Merge pull request #902 from keynslug/fix/rlx_get_nodename
Browse files Browse the repository at this point in the history
Use `erlexec` directly in relx helper functions
  • Loading branch information
tsloughter authored Jun 18, 2022
2 parents 4baa294 + deac62a commit b5182ce
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions priv/templates/extended_bin
Original file line number Diff line number Diff line change
Expand Up @@ -259,24 +259,24 @@ relx_get_nodename() {
id="longname$(relx_gen_id)-${NAME}"
if [ -z "$COOKIE" ]; then
# shellcheck disable=SC2086
"$BINDIR/erl" -boot "$REL_DIR"/start_clean \
-mode interactive \
-boot_var SYSTEM_LIB_DIR "$SYSTEM_LIB_DIR" \
-eval '[_,H]=re:split(atom_to_list(node()),"@",[unicode,{return,list}]), io:format("~s~n",[H]), halt()' \
-dist_listen false \
${START_EPMD} \
-noshell "${NAME_TYPE}" "$id"
"$BINDIR/erlexec" -boot "$REL_DIR"/start_clean \
-mode interactive \
-boot_var SYSTEM_LIB_DIR "$SYSTEM_LIB_DIR" \
-eval '[_,H]=re:split(atom_to_list(node()),"@",[unicode,{return,list}]), io:format("~s~n",[H]), halt()' \
-dist_listen false \
${START_EPMD} \
-noshell "${NAME_TYPE}" "$id"
else
# running with setcookie prevents a ~/.erlang.cookie from being created
# shellcheck disable=SC2086
"$BINDIR/erl" -boot "$REL_DIR"/start_clean \
-mode interactive \
-boot_var SYSTEM_LIB_DIR "$SYSTEM_LIB_DIR" \
-eval '[_,H]=re:split(atom_to_list(node()),"@",[unicode,{return,list}]), io:format("~s~n",[H]), halt()' \
-setcookie "${COOKIE}" \
-dist_listen false \
${START_EPMD} \
-noshell "${NAME_TYPE}" "$id"
"$BINDIR/erlexec" -boot "$REL_DIR"/start_clean \
-mode interactive \
-boot_var SYSTEM_LIB_DIR "$SYSTEM_LIB_DIR" \
-eval '[_,H]=re:split(atom_to_list(node()),"@",[unicode,{return,list}]), io:format("~s~n",[H]), halt()' \
-setcookie "${COOKIE}" \
-dist_listen false \
${START_EPMD} \
-noshell "${NAME_TYPE}" "$id"
fi
}

Expand Down Expand Up @@ -305,7 +305,7 @@ relx_rem_sh() {
# -dist_listen is new in OTP-23. It keeps the remote node from binding to a listen port
# and implies the option -hidden
# shellcheck disable=SC2086
exec "$BINDIR/erl" ${remote_nodename} -remsh "$NAME" -boot "$REL_DIR"/start_clean -mode interactive \
exec "$BINDIR/erlexec" ${remote_nodename} -remsh "$NAME" -boot "$REL_DIR"/start_clean -mode interactive \
-boot_var SYSTEM_LIB_DIR "$SYSTEM_LIB_DIR" \
-setcookie "$COOKIE" -hidden -kernel net_ticktime "$TICKTIME" \
-dist_listen false \
Expand Down

0 comments on commit b5182ce

Please sign in to comment.