diff options
author | Tristan Sloughter <[email protected]> | 2019-04-14 07:21:04 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2019-04-14 07:21:04 -0600 |
commit | 8ff1e44cebf3aee09969a9324c04074ba87f10b9 (patch) | |
tree | 6ba516ce5a442a3a49d21d0c9338332073382e38 /priv/templates/extended_bin | |
parent | 4825a495febf31f5be172d1a7e9b89a1514f1b5c (diff) | |
download | relx-8ff1e44cebf3aee09969a9324c04074ba87f10b9.tar.gz relx-8ff1e44cebf3aee09969a9324c04074ba87f10b9.tar.bz2 relx-8ff1e44cebf3aee09969a9324c04074ba87f10b9.zip |
add dist name and cookie to ERL_FLAGS for nodetool (#712)v3.31.0
* remove deprecated hex field from .app.src
* start nodetool dist node in erl flags
Diffstat (limited to 'priv/templates/extended_bin')
-rwxr-xr-x | priv/templates/extended_bin | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index cfeb859..a4cba4a 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -189,16 +189,22 @@ relx_gen_id() { relx_nodetool() { command="$1"; shift + # Generate a unique id used to allow multiple nodetool calls to the + # same node transparently + nodetool_id="maint$(relx_gen_id)-${NAME}" + if [ -z "${START_EPMD}" ]; then - ERL_FLAGS="${ERL_FLAGS} ${MAYBE_DIST_ARGS}" "$ERTS_DIR/bin/escript" \ - "$ROOTDIR/bin/nodetool" "$NAME_TYPE" "$NAME" \ - -setcookie "$COOKIE" "$command" $@ + ERL_FLAGS="${ERL_FLAGS} ${MAYBE_DIST_ARGS} ${NAME_TYPE} $nodetool_id -setcookie ${COOKIE}" \ + "$ERTS_DIR/bin/escript" \ + "$ROOTDIR/bin/nodetool" \ + "$NAME_TYPE" "$NAME" \ + "$command" $@ else - ERL_FLAGS="${ERL_FLAGS} ${MAYBE_DIST_ARGS}" "$ERTS_DIR/bin/escript" \ - "$ROOTDIR/bin/nodetool" "$NAME_TYPE" "$NAME" \ - $START_EPMD -setcookie "$COOKIE" "$command" $@ + ERL_FLAGS="${ERL_FLAGS} ${MAYBE_DIST_ARGS} ${NAME_TYPE} $nodetool_id -setcookie ${COOKIE}" \ + "$ERTS_DIR/bin/escript" \ + "$ROOTDIR/bin/nodetool" \ + $START_EPMD "$NAME_TYPE" "$NAME" "$command" $@ fi - } # Run an escript in the node's environment |