aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Merritt <[email protected]>2014-01-22 12:31:23 -0800
committerEric Merritt <[email protected]>2014-01-22 12:31:23 -0800
commit917a135f558245a365115257f2507d675ddc7f1a (patch)
tree73941534db628782847538f30ff3eef6194d7bc1
parent62f620967c4df2fa81b7c4d116208d0b61b90dbc (diff)
parent323191653b0f4a787a77f1fa310cee119d64df3c (diff)
downloadrelx-917a135f558245a365115257f2507d675ddc7f1a.tar.gz
relx-917a135f558245a365115257f2507d675ddc7f1a.tar.bz2
relx-917a135f558245a365115257f2507d675ddc7f1a.zip
Merge pull request #112 from tsloughter/mvoe_nodetool_install_upgrade
mv nodetool and install_upgrade script to bin dir, so no need to incl erts
-rw-r--r--src/rlx_prv_assembler.erl35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/rlx_prv_assembler.erl b/src/rlx_prv_assembler.erl
index 644b362..cdbcea0 100644
--- a/src/rlx_prv_assembler.erl
+++ b/src/rlx_prv_assembler.erl
@@ -302,6 +302,22 @@ write_bin_file(State, Release, OutputDir, RelDir) ->
rlx_release:erts(Release),
ErlOpts);
true ->
+ case rlx_state:get(State, extended_start_script, false) of
+ true ->
+ Prefix = code:root_dir(),
+ ok = ec_file:copy(filename:join([Prefix, "bin", "start_clean.boot"]),
+ filename:join([BinDir, "start_clean.boot"])),
+ NodeToolFile = nodetool_contents(),
+ InstallUpgradeFile = install_upgrade_escript_contents(),
+ NodeTool = filename:join([BinDir, "nodetool"]),
+ InstallUpgrade = filename:join([BinDir, "install_upgrade.escript"]),
+ ok = file:write_file(NodeTool, NodeToolFile),
+ ok = file:write_file(InstallUpgrade, InstallUpgradeFile),
+ ok = file:change_mode(NodeTool, 8#755),
+ ok = file:change_mode(InstallUpgrade, 8#755);
+ false ->
+ ok
+ end,
extended_bin_file_contents(RelName, RelVsn, rlx_release:erts(Release), ErlOpts)
end,
%% We generate the start script by default, unless the user
@@ -394,21 +410,6 @@ include_erts(State, Release, OutputDir, RelDir) ->
ok = ec_file:remove(Erl),
ok = file:write_file(Erl, erl_script(ErtsVersion)),
ok = file:change_mode(Erl, 8#755),
- case rlx_state:get(State, extended_start_script, false) of
- true ->
- ok = ec_file:copy(filename:join([Prefix, "bin", "start_clean.boot"]),
- filename:join([OutputDir, "bin", "start_clean.boot"])),
- NodeToolFile = nodetool_contents(),
- InstallUpgradeFile = install_upgrade_escript_contents(),
- NodeTool = filename:join([LocalErts, "bin", "nodetool"]),
- InstallUpgrade = filename:join([LocalErts, "bin", "install_upgrade.escript"]),
- ok = file:write_file(NodeTool, NodeToolFile),
- ok = file:write_file(InstallUpgrade, InstallUpgradeFile),
- ok = file:change_mode(NodeTool, 8#755),
- ok = file:change_mode(InstallUpgrade, 8#755);
- false ->
- ok
- end,
make_boot_script(State, Release, OutputDir, RelDir)
end;
_ ->
@@ -809,7 +810,7 @@ cd $ROOTDIR
REMSH=\"$BINDIR/erl $REMSH_NAME_ARG $REMSH_REMSH_ARG $COOKIE_ARG\"
# Setup command to control the node
-NODETOOL=\"$BINDIR/escript $BINDIR/nodetool $NAME_ARG $COOKIE_ARG\"
+NODETOOL=\"$BINDIR/escript $ROOTDIR/bin/nodetool $NAME_ARG $COOKIE_ARG\"
# Check the first argument for instructions
case \"$1\" in
@@ -941,7 +942,7 @@ case \"$1\" in
node_name=`echo $NAME_ARG | awk '{print $2}'`
erlang_cookie=`echo $COOKIE_ARG | awk '{print $2}'`
- exec $BINDIR/escript $BINDIR/install_upgrade.escript $REL_NAME $node_name $erlang_cookie $2
+ exec $BINDIR/escript $ROOTDIR/bin/install_upgrade.escript $REL_NAME $node_name $erlang_cookie $2
;;
console|console_clean|console_boot)