aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Wiger <[email protected]>2018-11-27 18:55:14 +0100
committerUlf Wiger <[email protected]>2018-11-27 18:55:14 +0100
commit5a5e2c66969f0377328d1d1db9f359c43ec9e903 (patch)
treedc6867816961827620057073333c5bb6b972c203
parentbb8af6ddec20f44599f7cd0c3e626996a3206dad (diff)
downloadrelx-5a5e2c66969f0377328d1d1db9f359c43ec9e903.tar.gz
relx-5a5e2c66969f0377328d1d1db9f359c43ec9e903.tar.bz2
relx-5a5e2c66969f0377328d1d1db9f359c43ec9e903.zip
run named erl nodes to auto-set cookie
-rwxr-xr-xpriv/templates/extended_bin4
-rw-r--r--priv/templates/extended_bin_windows2
2 files changed, 4 insertions, 2 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index 78f25e0..854cf6a 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
diff --git a/priv/templates/extended_bin_windows b/priv/templates/extended_bin_windows
index 00ecf9b..045a80c 100644
--- a/priv/templates/extended_bin_windows
+++ b/priv/templates/extended_bin_windows
@@ -137,7 +137,7 @@
@for /f "delims=" %%i in ('where erl') do @(
set erl=%%i
)
-@set dir_cmd="%erl%" -boot no_dot_erlang -noshell -eval "io:format(\"~s\", [filename:nativename(code:root_dir())])." -s init stop
+@set dir_cmd="%erl%" -sname dummy -boot no_dot_erlang -noshell -eval "io:format(\"~s\", [filename:nativename(code:root_dir())])." -s init stop
@for /f "delims=" %%i in ('%%dir_cmd%%') do @(
set erl_root=%%i
)