3 # Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
5 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
6 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public
10 # License as published by the Free Software Foundation; either
11 # version 2.1 of the License.
13 # This library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # Lesser General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with this library; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 # See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 export KERNEL_ROOT_DIR=@KERNEL_ROOT_DIR@
25 export ATOMSOLV_ROOT_DIR=@prefix@
28 echo -n "Searching for a free port for naming service: "
34 aRes=`netstat -ltn | grep -E :${NSPORT}`
35 if [ -z "$aRes" ]; then
37 local myhost=`hostname`
38 export OMNIORB_CONFIG=${HOME}/.omniORB_${myhost}_${NSPORT}.cfg
39 local initref="NameService=corbaname::"`hostname`":$NSPORT"
40 if [[ `python -c "import CORBA; print CORBA.ORB_ID"` = "omniORB4" ]]; then
41 echo "InitRef = $initref" > $OMNIORB_CONFIG
43 echo "ORBInitRef $initref" > $OMNIORB_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."
61 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python -i $ATOMSOLV_ROOT_DIR/bin/salome/myrunSalome.py --modules=ATOMSOLV --containers=cpp,python --killall