From 67023c0708d786f62f2f5ff50627699910416f8a Mon Sep 17 00:00:00 2001 From: Jay Doane Date: Tue, 31 Mar 2015 23:08:36 -0700 Subject: Replace "-s init stop" with halt() --- priv/templates/bin.dtl | 4 ++-- priv/templates/extended_bin.dtl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 priv/templates/extended_bin.dtl diff --git a/priv/templates/bin.dtl b/priv/templates/bin.dtl index 3398d63..dd11707 100755 --- a/priv/templates/bin.dtl +++ b/priv/templates/bin.dtl @@ -17,8 +17,8 @@ find_erts_dir() { ROOTDIR="$RELEASE_ROOT_DIR" else local erl="$(which erl)" - code="io:format(\"~s\", [code:root_dir()])." - local erl_root="$("$erl" -noshell -eval "$code" -s init stop)" + code="io:format(\"~s\", [code:root_dir()]), halt()." + local erl_root="$("$erl" -noshell -eval "$code")" ERTS_DIR="$erl_root/erts-$ERTS_VSN" ROOTDIR="$erl_root" fi diff --git a/priv/templates/extended_bin.dtl b/priv/templates/extended_bin.dtl old mode 100644 new mode 100755 index 9a3ab61..b42df00 --- a/priv/templates/extended_bin.dtl +++ b/priv/templates/extended_bin.dtl @@ -19,8 +19,8 @@ find_erts_dir() { ROOTDIR="$RELEASE_ROOT_DIR" else local erl="$(which erl)" - code="io:format(\"~s\", [code:root_dir()])." - local erl_root="$("$erl" -noshell -eval "$code" -s init stop)" + code="io:format(\"~s\", [code:root_dir()]), halt()." + local erl_root="$("$erl" -noshell -eval "$code")" ERTS_DIR="$erl_root/erts-$ERTS_VSN" ROOTDIR="$erl_root" fi -- cgit v1.2.3 From 06311df28d24264c81df780a30303eb1f47d288a Mon Sep 17 00:00:00 2001 From: Jay Doane Date: Sat, 4 Apr 2015 11:38:33 -0700 Subject: Replace "-s init stop" with "halt()" in relx_get_longname --- priv/templates/extended_bin.dtl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/templates/extended_bin.dtl b/priv/templates/extended_bin.dtl index b42df00..4284772 100755 --- a/priv/templates/extended_bin.dtl +++ b/priv/templates/extended_bin.dtl @@ -40,7 +40,7 @@ relx_get_pid() { relx_get_longname() { id="longname$(relx_gen_id)-${NAME}" - "$BINDIR/erl" -boot start_clean -eval 'io:format("~s~n", [node()])' -noshell -s init stop -name $id | sed -e 's/.*@//g' + "$BINDIR/erl" -boot start_clean -eval 'io:format("~s~n", [node()]), halt()' -noshell -name $id | sed -e 's/.*@//g' } # Connect to a remote node -- cgit v1.2.3 From 9cd4c150979d03177b5262a7da31801f0d22f877 Mon Sep 17 00:00:00 2001 From: Jay Doane Date: Sat, 4 Apr 2015 11:40:03 -0700 Subject: Replace "cut -d ' ' -f2" with "awk '{print $2}'" so it will work on a mac, where od -X /dev/urandom returns columns separated by more than one space --- priv/templates/extended_bin.dtl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/templates/extended_bin.dtl b/priv/templates/extended_bin.dtl index 4284772..452669c 100755 --- a/priv/templates/extended_bin.dtl +++ b/priv/templates/extended_bin.dtl @@ -60,7 +60,7 @@ relx_rem_sh() { # Generate a random id relx_gen_id() { - od -X /dev/urandom | head -n1 | cut -d ' ' -f2 + od -X /dev/urandom | head -n1 | awk '{print $2}' } # Control a node -- cgit v1.2.3