[erlang-questions] Setting node name from the shell started withou -name or -sname
Gleb Peregud
gleber.p@REDACTED
Wed Apr 23 19:30:52 CEST 2008
It is enough to:
gleber@REDACTED:~$ erl
Erlang (BEAM) emulator version 5.6.2 [source] [async-threads:0] [hipe]
[kernel-poll:false]
Eshell V5.6.2 (abort with ^G)
1> net_kernel:start([foo, shortnames]).
{ok,<0.31.0>}
(foo@REDACTED)2> erlang:set_cookie(node(), 'super_secret_cookie').
true
(foo@REDACTED)3>
On 4/23/08, Zvi <exta7@REDACTED> wrote:
>
> It's possible to set cookie name programmatically, using
> erlang:set_cookie/2,
> even if BEAM started without -setcookie flag or .erlang.cookie file.
> How to set a node name for BEAM started without -name or -sname flags?
> There is undocumented erlang:setnode/2 BIF, I guess that it's:
> setnode(NodeName::node(),PortNumber::int())
> but still have no idea how to use it.
>
> TIA,
> Zvi
>
> --
> View this message in context:
> http://www.nabble.com/Setting-node-name-from-the-shell-started-withou--name-or--sname-tp16834718p16834718.html
> Sent from the Erlang Questions mailing list archive at Nabble.com.
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
--
Gleb Peregud
http://gleber.pl/
Every minute is to be grasped.
Time waits for nobody.
-- Inscription on a Zen Gong
More information about the erlang-questions
mailing list