3 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
5 APPLI_HOME=`dirname $0`
6 export APPLI=`${APPLI_HOME}/getAppliPath.py`
8 # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
10 . ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
12 # --- define port for CORBA naming service
15 echo -n "Searching for a free port for naming service: "
21 aRes=`netstat -ltn | grep -E :${NSPORT}`
22 if [ -z "$aRes" ]; then
24 local myhost=`hostname`
25 OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
30 local initref="NameService=corbaname::"`hostname`":$NSPORT"
31 #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
32 echo "InitRef = $initref" > $OMNIORB_CONFIG
33 LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg
34 export LAST_RUNNING_CONFIG
35 rm ${LAST_RUNNING_CONFIG}
36 ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
40 if [[ $NSPORT -eq $limit ]] ; then
42 echo "Can't find a free port to launch omniNames"
43 echo "Try to kill the running servers and then launch SALOME again."
50 # --- if mpi lam, start lam (seems safe to be done several times)
51 # arret manuel avec lamhalt
53 if [ "$LAMBHOST" ]; then
57 # --- invoque shell with or without args
61 if [ $# -ne 0 ] ; then
62 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
65 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
69 rm ${LAST_RUNNING_CONFIG}