diff options
author | Jordan Wilberding <[email protected]> | 2015-01-11 08:44:16 -0800 |
---|---|---|
committer | Jordan Wilberding <[email protected]> | 2015-01-11 08:44:16 -0800 |
commit | ab85c2365ad346d77aa425507df75733e4af01d8 (patch) | |
tree | 6fdf44f5901013bbfb0fb775d1b406c9d69425bc | |
parent | 8b85968aef3145fb883c9558fd21702100e9ac9f (diff) | |
parent | 98053bd3904bce681c36715ae271bb7d56a88764 (diff) | |
download | relx-ab85c2365ad346d77aa425507df75733e4af01d8.tar.gz relx-ab85c2365ad346d77aa425507df75733e4af01d8.tar.bz2 relx-ab85c2365ad346d77aa425507df75733e4af01d8.zip |
Merge pull request #296 from tsloughter/basic_bin
handle the renaming of the boot script to start.boot in basic bin script
-rwxr-xr-x | priv/templates/bin.dtl | 9 |
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 $@ |