<div dir="ltr">I needed to get to the bottom of an issue on my system that involved name resolution.  I noticed in the Kernel Reference Manual that the net_adm:<a href="http://www.erlang.org/doc/man/net_adm.html#host_file-0">host_file</a> function it states that the host_file function:<div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>Reads the .hosts.erlang file, see the section Files below. Returns the hosts in this file as a list, or returns {error, Reason} if the file could not be read or the Erlang terms on the file could not be interpreted.<br></div></blockquote><br></div><div>When you scroll to the bottom and read the Files section you see the following:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>The .hosts.erlang file consists of a number of host names written as Erlang terms. It is looked for in the current work directory, the user's home directory, and $OTP_ROOT (the root directory of Erlang/OTP), in that order.</div><div><br></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>Note the underscore/underbar '_' in OTP_ROOT</div></blockquote><br></div><div>If you then read the beginning of the <a href="http://erlang.org/doc/man/code.html">code</a> module documentation, the second paragraph of the Code Path section has the following:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>Initially, the code path consists of the current working directory and all Erlang object code directories under the library directory $OTPROOT/lib, where $OTPROOT is the installation directory of Erlang/OTP, code:root_dir().<br></div><div><br></div><div>Note the LACK of the underscore/underbar '_' in OTPROOT<br></div></blockquote><br></div><div>Luckily we can always fall back on the Kernel Reference Manual section describing the <a href="http://www.erlang.org/doc/man/config.html">config</a> file which clears it all up with:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>When starting Erlang in embedded mode, it is assumed that exactly one system configuration file is used, named sys.config. This file should be located in $ROOT/releases/Vsn, where $ROOT is the Erlang/OTP root installation directory and Vsn is the release version.<br></div><div><br></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>Confused about whether to use OTP or OTP_ in identifying the root installation for Erlang/OTP?  Don't use either!</div></blockquote><br></div><div>Now I suppose by having three different ways for "identifying the root installation directory" that maybe the authors never intended for an end user to define environmental/system variables... then again...</div><div><br></div><div>Building and Installing Erlang/OTP => <a href="http://www.erlang.org/doc/installation_guide/INSTALL.html#Advanced-configuration-and-build-of-ErlangOTP_make-and-ERLTOP">make and $ERL_TOP</a> opens with the sentence, "All the makefiles in the entire directory tree use the environment variable ERL_TOP to find the absolute path of the installation." so maybe we need to define ONE environment variable.<br></div><div><br></div><div><br></div><div>So OTP_ROOT, OTPROOT, ROOT, or don't bother with any of them?</div><div><br></div><div><br></div><div>SenseiC bows out.</div></div>