diff options
author | Luis Rascão <[email protected]> | 2019-01-31 09:50:55 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-01-31 09:50:55 +0000 |
commit | 8d947fcadb3770f51c4aae73bc4a55ea979bc640 (patch) | |
tree | 4db560503d18f22946ab8dfc8d339e10df53d84a /priv/templates/extended_bin | |
parent | 7332aaf02d8be8e6895a62c4d9537f49e68dac4a (diff) | |
parent | 5a5e2c66969f0377328d1d1db9f359c43ec9e903 (diff) | |
download | relx-8d947fcadb3770f51c4aae73bc4a55ea979bc640.tar.gz relx-8d947fcadb3770f51c4aae73bc4a55ea979bc640.tar.bz2 relx-8d947fcadb3770f51c4aae73bc4a55ea979bc640.zip |
Merge pull request #678 from aeternity/uw-auto-set-cookie
run named erl nodes to auto-set cookie
Diffstat (limited to 'priv/templates/extended_bin')
-rwxr-xr-x | priv/templates/extended_bin | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index 6b01b38..e5de981 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -127,10 +127,12 @@ find_erts_dir() { if [ -d "$__erts_dir" ]; then ERTS_DIR="$__erts_dir"; ROOTDIR="$RELEASE_ROOT_DIR" + # run a dummy distributed erlang node just to ensure that a cookie exists + $ERTS_DIR/bin/erl -sname dummy -boot no_dot_erlang -noshell -eval "halt()" else __erl="$(which erl)" code="io:format(\"~s\", [code:root_dir()]), halt()." - __erl_root="$("$__erl" -boot no_dot_erlang -sasl errlog_type error -noshell -eval "$code")" + __erl_root="$("$__erl" -sname dummy -boot no_dot_erlang -sasl errlog_type error -noshell -eval "$code")" ERTS_DIR="$__erl_root/erts-$ERTS_VSN" ROOTDIR="$__erl_root" fi |