3 # --- retrieve APPLI path, relative to $HOME
4 # on sarge, "which" gives not allways the absolute path...
8 if test x$aa == x\/; then
10 elif test x$aa == x\.; then
11 mycom=${PWD}/${comName:2}
13 mycom=${PWD}/${comName}
15 APPLI=`echo ${HOME} \`dirname $mycom\` | awk ' { print substr($2,length($1)+2) } '`
19 # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
21 . ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
23 # --- define port for CORBA naming service
26 echo -n "Searching for a free port for naming service: "
32 aRes=`netstat -ltn | grep -E :${NSPORT}`
33 if [ -z "$aRes" ]; then
35 local myhost=`hostname`
36 export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
38 export NSHOST=${myhost}
39 local initref="NameService=corbaname::"`hostname`":$NSPORT"
40 #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
41 echo "InitRef = $initref" > $OMNIORB_CONFIG
42 export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
43 rm ${LAST_RUNNING_CONFIG}
44 ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
48 if [[ $NSPORT -eq $limit ]] ; then
50 echo "Can't find a free port to launch omniNames"
51 echo "Try to kill the running servers and then launch SALOME again."
59 # (default arguments defined in local salome.launch could be completed
60 # by arguments to this command)
64 if [ $# -ne 0 ] ; then
65 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python -i ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $*
67 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py
71 rm ${LAST_RUNNING_CONFIG}