Skip to content

Commit

Permalink
Added, until erlware/relx#809 is accepted.
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier-Boudeville committed Aug 11, 2020
1 parent 5a6757c commit 246e1e8
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions conf/us_web.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- us_web-source 2020-08-11 21:51:04.724167964 +0200
+++ us_web.target 2020-08-11 21:56:14.507137897 +0200
@@ -647,17 +647,19 @@

# Extract the target cookie
# Do this before relx_get_nodename so we can use it and not create a ~/.erlang.cookie
-COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH" || true)"
-DEFAULT_COOKIE_FILE="$HOME/.erlang.cookie"
-if [ -z "$COOKIE_ARG" ]; then
- if [ -f "$DEFAULT_COOKIE_FILE" ]; then
- COOKIE="$(cat "$DEFAULT_COOKIE_FILE")"
+if [ -z "$COOKIE" ]; then
+ COOKIE_ARG="$(grep '^-setcookie' "$VMARGS_PATH" || true)"
+ DEFAULT_COOKIE_FILE="$HOME/.erlang.cookie"
+ if [ -z "$COOKIE_ARG" ]; then
+ if [ -f "$DEFAULT_COOKIE_FILE" ]; then
+ COOKIE="$(cat "$DEFAULT_COOKIE_FILE")"
+ else
+ echo "No cookie is set or found. This limits the scripts functionality, installing, upgrading, rpc and getting a list of versions will not work."
+ fi
else
- echo "No cookie is set or found. This limits the scripts functionality, installing, upgrading, rpc and getting a list of versions will not work."
+ # Extract cookie name from COOKIE_ARG
+ COOKIE="$(echo "$COOKIE_ARG" | awk '{print $2}')"
fi
-else
- # Extract cookie name from COOKIE_ARG
- COOKIE="$(echo "$COOKIE_ARG" | awk '{print $2}')"
fi

# User can specify an sname without @hostname

0 comments on commit 246e1e8

Please sign in to comment.