forked from 2600hz/kazoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
relx script patch to control node name and cookie
- Loading branch information
1 parent
a81436e
commit 7cccdd6
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@@ -149,7 +149,7 @@ | ||
fi | ||
|
||
# Extract the target node name from node.args | ||
-NAME_ARG=$(egrep '^-s?name' "$VMARGS_PATH" || true) | ||
+NAME_ARG=${NAME_ARG:-$(egrep '^-s?name' "$VMARGS_PATH" || true)} | ||
if [ -z "$NAME_ARG" ]; then | ||
echo "vm.args needs to have either -name or -sname parameter." | ||
exit 1 | ||
@@ -162,7 +162,7 @@ | ||
PIPE_DIR="${PIPE_DIR:-/tmp/erl_pipes/$NAME/}" | ||
|
||
# Extract the target cookie | ||
-COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH" || true)" | ||
+COOKIE_ARG="${COOKIE_ARG:-$(grep '^-setcookie' "$VMARGS_PATH" || true)}" | ||
if [ -z "$COOKIE_ARG" ]; then | ||
echo "vm.args needs to have a -setcookie parameter." | ||
exit 1 | ||
@@ -374,6 +374,7 @@ | ||
set -- "$BINDIR/erlexec" -boot "$BOOTFILE" -mode "$CODE_LOADING_MODE" \ | ||
-boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \ | ||
-config "$RELX_CONFIG_PATH" \ | ||
+ $NAME_ARG \ | ||
-args_file "$VMARGS_PATH" | ||
|
||
# Dump environment info for logging purposes | ||
@@ -410,6 +411,7 @@ | ||
set -- "$BINDIR/erlexec" $FOREGROUNDOPTIONS \ | ||
-boot "$REL_DIR/$BOOTFILE" -mode "$CODE_LOADING_MODE" -config "$RELX_CONFIG_PATH" \ | ||
-boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \ | ||
+ $NAME_ARG \ | ||
-args_file "$VMARGS_PATH" | ||
|
||
# Dump environment info for logging purposes |