Skip to content

Commit

Permalink
add msg for epmd
Browse files Browse the repository at this point in the history
  • Loading branch information
mihawk committed Apr 4, 2016
1 parent 5bab094 commit 78d7cf4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/provision/mad_repl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ load_apps(Params,_,_Acc) -> [ application:ensure_all_started(list_to_atom(A))||A

cwd() -> case file:get_cwd() of {ok, Cwd} -> Cwd; _ -> "." end.

sh(["-sname", Name| Rest]) -> net_kernel:start([list_to_atom(Name), shortnames]),sh(Rest);
sh(["-name", Name| Rest]) -> net_kernel:start([list_to_atom(Name), longnames]),sh(Rest);
epmd({error,{{shutdown, {_,net_kernel,{'EXIT',nodistribution}}},_}}) ->
mad:info("Erlang Distribution failed, falling back to nonode@nohost. Verify that epmd is running and try again.",[]);
epmd(_) -> ok.

sh(["-sname", Name| Rest]) -> epmd(net_kernel:start([list_to_atom(Name), shortnames])),sh(Rest);
sh(["-name", Name| Rest]) -> epmd(net_kernel:start([list_to_atom(Name), longnames])),sh(Rest);
sh(Params) ->
{ _Cwd,_ConfigFileName,_Config } = mad_utils:configs(),
SystemPath = filelib:wildcard(code:root_dir() ++ "/lib/{"
Expand Down

0 comments on commit 78d7cf4

Please sign in to comment.