aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-01-10 21:46:18 -0600
committerTristan Sloughter <[email protected]>2015-01-10 21:46:49 -0600
commit98053bd3904bce681c36715ae271bb7d56a88764 (patch)
tree94b0aee3b904dc7e7b2bb16c46dbec617c3af98b
parentc215312707728f0b50f4dd71e7ac9b4305850bad (diff)
downloadrelx-98053bd3904bce681c36715ae271bb7d56a88764.tar.gz
relx-98053bd3904bce681c36715ae271bb7d56a88764.tar.bz2
relx-98053bd3904bce681c36715ae271bb7d56a88764.zip
handle the renaming of the boot script to start.boot in basic bin script
-rwxr-xr-xpriv/templates/bin.dtl9
1 files changed, 4 insertions, 5 deletions
diff --git a/priv/templates/bin.dtl b/priv/templates/bin.dtl
index 434cbd4..3398d63 100755
--- a/priv/templates/bin.dtl
+++ b/priv/templates/bin.dtl
@@ -17,12 +17,11 @@ find_erts_dir() {
ROOTDIR="$RELEASE_ROOT_DIR"
else
local erl="$(which erl)"
- code="io:format(\"~s\", [code:root_dir()]), halt()."
- local erl_root="$("$erl" -noshell -eval "$code")"
+ code="io:format(\"~s\", [code:root_dir()])."
+ local erl_root="$("$erl" -noshell -eval "$code" -s init stop)"
ERTS_DIR="$erl_root/erts-$ERTS_VSN"
ROOTDIR="$erl_root"
fi
-
}
find_sys_config() {
@@ -48,7 +47,7 @@ export EMU="beam"
export PROGNAME="erl"
export LD_LIBRARY_PATH="$ERTS_DIR/lib:$LD_LIBRARY_PATH"
ERTS_LIB_DIR="$ERTS_DIR/../lib"
-
+[ -f "$REL_DIR/$REL_NAME.boot" ] && BOOTFILE="$REL_NAME" || BOOTFILE=start
cd "$ROOTDIR"
# Save extra arguments
@@ -58,7 +57,7 @@ ARGS="$@"
set -- "$ERL_OPTS"
[ "$SYS_CONFIG" ] && set -- "$@" -config "$SYS_CONFIG"
[ "$VM_ARGS" ] && set -- "$@" -args_file "$VM_ARGS"
-set -- "$@" -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" -boot "$REL_DIR/$REL_NAME" "$ARGS"
+set -- "$@" -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" -boot "$REL_DIR/$BOOTFILE" "$ARGS"
# Boot the release
$BINDIR/erlexec $@