3 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
5 . `dirname $0`/setAppliPath.sh
7 # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
9 . ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
11 # --- define port for CORBA naming service
14 echo -n "Searching for a free port for naming service: "
20 aRes=`netstat -ltn | grep -E :${NSPORT}`
21 if [ -z "$aRes" ]; then
23 local myhost=`hostname`
24 OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
29 local initref="NameService=corbaname::"`hostname`":$NSPORT"
30 #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
31 echo "InitRef = $initref" > $OMNIORB_CONFIG
32 LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg
33 export LAST_RUNNING_CONFIG
34 rm ${LAST_RUNNING_CONFIG}
35 ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
39 if [[ $NSPORT -eq $limit ]] ; then
41 echo "Can't find a free port to launch omniNames"
42 echo "Try to kill the running servers and then launch SALOME again."
49 # --- if mpi lam, start lam (seems safe to be done several times)
50 # arret manuel avec lamhalt
52 if [ "$LAMBHOST" ]; then
56 # --- invoque shell with or without args
60 if [ $# -ne 0 ] ; then
61 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
64 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
68 rm ${LAST_RUNNING_CONFIG}