Releases, config and boot script

Ulf Wiger etxuwig@REDACTED
Thu Jul 27 09:53:57 CEST 2000


On 27 Jul 2000, Samuel Tardieu wrote:

>When a release is set as the default one with
>release_handler:make_permanent, how does the next start find the right
>sys.config and start.boot files?

There is a file in releases/ called start_erl.data, which identifies
the ERTS version and the system release version:

ernie@REDACTED> cat .../releases/start_erl.data 
4.8.2.7 R1

There should be (and is) a releases/R1/ directory in the above
example, where you can find the start.boot and sys.config files.

Here are some extracts from the AXD 301 start scripts, showing how one
can derive info from start_erl.data and other files.

if [ -f `eval echo $CP_DIR/releases/start_erl.data` ]; then
  START_ERL_DATA=`eval cat $CP_DIR/releases/start_erl.data`
else
  exit_not_installed
fi

  
ERTS_VSN=`eval echo $START_ERL_DATA | awk '{print $1}'`
VSN=`eval echo $START_ERL_DATA | awk '{print $2}'`

if [ -f `eval echo $CP_DIR/releases/$VSN/$BOOTFLAGS_FILE` ]; then
  BOOTFLAGS=`eval cat $CP_DIR/releases/$VSN/$BOOTFLAGS_FILE`
  PIPE_DIR=/tmp/axd301@$HOST/
  SYS_CONFIG=`eval echo $CP_DIR/releases/$VSN/sys.config`
else
  exit_not_installed
fi

START_FLAGS=" -mode embedded -setcookie nc1 -env ERL_MAX_ETS_TABLES 30000 $EXTRA_START_FLAGS"

ERL_CMD="/usr/sbin/setuid_socket_wrap -d -snmp_fd,0:161 -- `eval echo $BOOTFLAGS` $HEART $START_FLAGS $IGNORE_MNESIA_BACKUP_AT_STARTUP"

if [ ! -d "$PIPE_DIR" ]; then mkdir $PIPE_DIR; fi

$OTP_ROOT/erts-$ERTS_VSN/bin/run_erl $PIPE_DIR $LOG_DIR "$ERL_CMD" >
/dev/null 2
>&1 &

echo "To connect the shell to the erlang node, run:"
echo "   to_erl $PIPE_DIR"
echo



>Do I have to give -config and -boot parameters explicitely? Or is
>there a way to tell erl that the files corresponding to the permanent
>release are to be used?
>
>In my case, the releases_dir path is set as a SASL application
>parameter in sys.config but this chicken/egg issue is not a problem
>(thanks to RELDIR which can be used instead).
>
>  Sam
>

-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Network Architecture & Product Strategies    mob: +46 70 519 81 95
Ericsson Telecom AB,              Datacom Networks and IP Services
Varuvägen 9, Älvsjö,                    S-126 25 Stockholm, Sweden




More information about the erlang-questions mailing list