From 33a38a68320adccee3559f3ad366ffae272b250d Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 23 May 2020 16:07:50 -0600 Subject: [PATCH] support getting ERL_DIST_PORT from vm.args -erl_epmd_port argument --- priv/templates/extended_bin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index b6c0b44e6..c31af58de 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -640,9 +640,9 @@ EPMD_MODULE="$(grep '^-epmd_module' "$VMARGS_PATH" || true)" if [ "$EPMD_MODULE" ]; then MAYBE_DIST_ARGS="${MAYBE_DIST_ARGS} ${EPMD_MODULE}" fi - +ERL_DIST_PORT=${ERL_DIST_PORT:-"$(grep '^-erl_epmd_port' "$VMARGS_PATH" | cut -f2 -d' ' || true)"} if [ "$ERL_DIST_PORT" ]; then - MAYBE_DIST_ARGS="${MAYBE_DIST_ARGS} -kernel inet_dist_listen_min ${ERL_DIST_PORT} -kernel inet_dist_listen_max ${ERL_DIST_PORT}" + MAYBE_DIST_ARGS="${MAYBE_DIST_ARGS} -erl_epmd_port ${ERL_DIST_PORT} -kernel inet_dist_listen_min ${ERL_DIST_PORT} -kernel inet_dist_listen_max ${ERL_DIST_PORT}" fi # Extract the target cookie