[erlang-questions] detection of hostname

Raimo Niskanen <>
Wed Oct 24 15:02:42 CEST 2012

On Wed, Oct 24, 2012 at 11:32:16AM +0200, Vlad Dumitrescu wrote:
> Hi Attila,
> On Wed, Oct 24, 2012 at 11:18 AM, Attila Rajmund Nohl
> <> wrote:
> > 2012/10/24 Vlad Dumitrescu <>:
> >> I am considering writing (and publishing) a script that would detect
> >> what kind of Erlang communication is possible on a certain machine.
> >> The script could say "Sorry buddy, you can't use long names on this
> >> machine at all" or "Please add 'foo' to /etc/hosts to let short names
> >> work". Whenever people discover some new edge case on their machines,
> >> they can update the script. Maybe it would be useful to distribute
> >> with OTP?
> >
> > I'm not sure how feasible it is. For example, the "Add 'foo' to
> > /etc/hosts" advice would not work at all if the operating system
> > doesn't use the /ets/hosts file for name resolving, for example on
> > Linux the /etc/nsswitch.conf file has a line like this:
> >
> > hosts: dns
> >
> > In an ideal world, you should only add a line "Turn to your system
> > administrator to properly configure your computer" to the
> > documentation. However, if there's no competent system administrator,
> > you're screwed even if you try to add a "crash course in system
> > administration" to your documentation or try to write a system
> > administrator script.
> You're right. The script can list a few things that might or might not
> work as starting points, so that people aren't completely lost.
> "You will likely have problems if you plan to use distributed Erlang
> (which includes emacs+distel or erlide). Here is a list of detected
> issues and some possible solutions. Since every network is different,
> only your administrator can be sure which one will work. If you are
> the administrator, try them one at a time until it works".

That is a good paragraph. I would suggest changing the last line
to not insult anybody's intelligence into something like:
  the administrator, use them as guidelines".
and let the reader resort to trying in the blind by him/herself.

> best regards,
> Vlad
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions


/ Raimo Niskanen, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list