aboutsummaryrefslogtreecommitdiffstats
path: root/priv
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-04-05 10:44:05 -0500
committerTristan Sloughter <[email protected]>2015-04-05 10:44:05 -0500
commitadc9ab5decde88870abbe195f1685da23bdf1016 (patch)
tree1a2aea5cfd99f574d70d6559ea86ba5d16f83b7b /priv
parent66ca6c7601519862f7cad15ecab545b7c5643e61 (diff)
parent9cd4c150979d03177b5262a7da31801f0d22f877 (diff)
downloadrelx-adc9ab5decde88870abbe195f1685da23bdf1016.tar.gz
relx-adc9ab5decde88870abbe195f1685da23bdf1016.tar.bz2
relx-adc9ab5decde88870abbe195f1685da23bdf1016.zip
Merge pull request #327 from jaydoane/replace-init-stop-with-halt
Replace "-s init stop" with halt()
Diffstat (limited to 'priv')
-rwxr-xr-xpriv/templates/bin.dtl4
-rwxr-xr-x[-rw-r--r--]priv/templates/extended_bin.dtl8
2 files changed, 6 insertions, 6 deletions
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
index 9a3ab61..452669c 100644..100755
--- 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
@@ -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
@@ -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