summaryrefslogtreecommitdiff
path: root/test/upgrade_project/rel/files
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2011-01-31 17:55:02 +0100
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-01-31 17:55:02 +0100
commit1ee21c523fdf96d93f6d6a1f48ac6944ed5e47cf (patch)
tree5fbef56d1e8b8c09e4cfd2c63608c11326e736bc /test/upgrade_project/rel/files
parentf04a1c9750bc196aafbb2931579db38624e68535 (diff)
Update nodetool in upgrade_project
Diffstat (limited to 'test/upgrade_project/rel/files')
-rw-r--r--[-rwxr-xr-x]test/upgrade_project/rel/files/nodetool22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/upgrade_project/rel/files/nodetool b/test/upgrade_project/rel/files/nodetool
index cb524ce..0318ca1 100755..100644
--- a/test/upgrade_project/rel/files/nodetool
+++ b/test/upgrade_project/rel/files/nodetool
@@ -7,6 +7,7 @@
%% -------------------------------------------------------------------
main(Args) ->
+ ok = start_epmd(),
%% Extract the args
{RestArgs, TargetNode} = process_args(Args, [], undefined),
@@ -73,6 +74,27 @@ process_args([Arg | Rest], Acc, Opts) ->
process_args(Rest, [Arg | Acc], Opts).
+start_epmd() ->
+ [] = os:cmd(epmd_path() ++ " -daemon"),
+ ok.
+
+epmd_path() ->
+ ErtsBinDir = filename:dirname(escript:script_name()),
+ Name = "epmd",
+ case os:find_executable(Name, ErtsBinDir) of
+ false ->
+ case os:find_executable(Name) of
+ false ->
+ io:format("Could not find epmd.~n"),
+ halt(1);
+ GlobalEpmd ->
+ GlobalEpmd
+ end;
+ Epmd ->
+ Epmd
+ end.
+
+
nodename(Name) ->
case string:tokens(Name, "@") of
[_Node, _Host] ->