3 # --- define port for CORBA naming service
6 echo -n "Searching for a free port for naming service: "
13 aRes=`netstat -ltn | grep -E :${NSPORT}`
14 if [ -z "$aRes" ]; then
16 local myhost=`hostname`
17 OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
22 local initref="NameService=corbaname::"`hostname`":$NSPORT"
23 #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
24 echo "InitRef = $initref" > $OMNIORB_CONFIG
25 LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
26 export LAST_RUNNING_CONFIG
27 rm ${LAST_RUNNING_CONFIG}
28 ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
32 if [[ $NSPORT -eq $limit ]] ; then
34 echo "Can't find a free port to launch omniNames"
35 echo "Try to kill the running servers and then launch SALOME again."