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 export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
26 export NSHOST=${myhost}
27 local initref="NameService=corbaname::"`hostname`":$NSPORT"
28 #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
29 echo "InitRef = $initref" > $OMNIORB_CONFIG
30 export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg
31 rm ${LAST_RUNNING_CONFIG}
32 ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
36 if [[ $NSPORT -eq $limit ]] ; then
38 echo "Can't find a free port to launch omniNames"
39 echo "Try to kill the running servers and then launch SALOME again."
46 # --- if mpi lam, start lam (seems safe to be done several times)
47 # arret manuel avec lamhalt
49 if [ "$LAMBHOST" ]; then
53 # --- invoque shell with or without args
57 if [ $# -ne 0 ] ; then
58 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
61 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
65 rm ${LAST_RUNNING_CONFIG}