aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/test/release_handler_SUITE_data/start_client
blob: 05d744f06eff8df56df5d5fb5da69c73a7944c80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
#
# This program invokes the erlang emulator by calling run_erl.
# It should only be used at an embedded target system.
# It should be modified to give the correct flags to erl (via start_erl),
# e.g -mode embedded -sname XXX
#
# Usage: start [Data]
#

if [ "x${NODENAME}" = "x" ]
then
    echo "ERROR: Variable \$NODENAME is not set!!"
    exit 1
fi

TESTHOST=`hostname | sed 's/[.].*//'`

ROOTDIR=%ROOT%
CLIENTDIR=$ROOTDIR/clients/type1/$NODENAME@$TESTHOST

RELDIR=$CLIENTDIR/releases

# Note that this scripts is modified an copied to $CLIENTDIR/bin/start
# in release_handler_SUITE:copy_client - therefore HEART_COMMAND is as follows:
HEART_COMMAND=$CLIENTDIR/bin/start
export HEART_COMMAND

START_ERL_DATA=${1:-$RELDIR/start_erl.data}

if [ ! -d /tmp/$NODENAME@$TESTHOST ]
then
        mkdir /tmp/$NODENAME@$TESTHOST
fi

$ROOTDIR/bin/run_erl /tmp/$NODENAME@$TESTHOST/ $CLIENTDIR/log "exec $ROOTDIR/bin/start_erl $ROOTDIR $RELDIR $START_ERL_DATA -heart -sname $NODENAME %CLIENTARGS%" > $CLIENTDIR/log/run_erl.out 2>&1 &