[erlang-questions] set node name and escript rpc_call to another node

db <>
Fri Feb 29 00:36:37 CET 2008


Would I be able to make rpc_call to another node from escript?  When I start
escript, erl node which escript start, is called   Is there a
way for this node to join the pool, so I can perform rpc call?

I have tried set the following in my escript:
net_kernel:start([foobar, shortnames])

When I ran the escript,  sasl is automatically started up.  This is my
default setup in .erlang file.  Even though, with net_kernel:start([foobar,
shortnames]) in escript, sasl application is running on , but
the node never assigned the name "foobar".  Why is this?

Here is the sasl output:

=PROGRESS REPORT==== 28-Feb-2008::15:44:03 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.32.0>},
                       {name,sasl_safe_sup},
                       {mfa,
                           {supervisor,start_link,
                               [{local,sasl_safe_sup},sasl,safe]}},
                       {restart_type,permanent},
                       {shutdown,infinity},
                       {child_type,supervisor}]

=PROGRESS REPORT==== 28-Feb-2008::15:44:03 ===
          supervisor: {local,sasl_sup}
             started: [{pid,<0.35.0>},
                       {name,release_handler},
                       {mfa,{release_handler,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 28-Feb-2008::15:44:03 ===
         application: sasl
          started_at: 

=PROGRESS REPORT==== 28-Feb-2008::15:44:03 ===
          supervisor: {local,net_sup}
             started: [{pid,<0.39.0>},
                       {name,erl_epmd},
                       {mfa,{erl_epmd,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 28-Feb-2008::15:44:03 ===
          supervisor: {local,net_sup}
             started: [{pid,<0.40.0>},
                       {name,auth},
                       {mfa,{auth,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 28-Feb-2008::15:44:03 ===
          supervisor: {local,net_sup}
             started: [{pid,<0.41.0>},
                       {name,net_kernel},
                       {mfa,{net_kernel,start_link,[[foobar,shortnames]]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 28-Feb-2008::15:44:03 ===
          supervisor: {local,kernel_sup}
             started: [{pid,<0.38.0>},
                       {name,net_sup_dynamic},
                       {mfa,
                           {erl_distribution,start_link,
                               [[foobar,shortnames]]}},
                       {restart_type,permanent},
                       {shutdown,1000},
                       {child_type,supervisor}]

-- 
rk

That which we persist in doing becomes easier for us to do; not that the
nature of the thing itself is changed, but that our power to do is
increased.
-Ralph Waldo Emerson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080228/40f845a1/attachment.html>


More information about the erlang-questions mailing list