Salome HOME
PR: merge from branch BR_auto_V310 tag mergefrom_OCC_development_for_3_2_0a2_10mar06
[modules/kernel.git] / bin / runNS.sh
1 #!/bin/sh
2
3 #log files localization
4
5 BaseDir=/tmp
6 Username=`/usr/bin/whoami`
7
8 # kill OmniNames if exists
9
10 #killall -q -9 omniNames
11
12 # clear log files
13
14 mkdir -m 777 ${BaseDir}/logs 
15 mkdir ${BaseDir}/logs/${Username}
16 touch ${BaseDir}/logs/${Username}/dummy
17 \rm -f ${BaseDir}/logs/${Username}/omninames* ${BaseDir}/logs/${Username}/dummy ${BaseDir}/logs/${Username}/*.log
18
19 echo "Name Service... "
20 aSedCommand="s/.*NameService=corbaname::`hostname`:\([[:digit:]]*\)/\1/"
21 aPort=`cat $OMNIORB_CONFIG | grep NameService | sed -e"$aSedCommand"`
22 omniNames -start $aPort -logdir ${BaseDir}/logs/${Username} &
23
24 # In LifeCycleCORBA, FactoryServer is started with rsh on the requested
25 #    computer if this Container does not exist. Default is localhost.
26 #    Others Containers are started with start_impl method of FactoryServer Container.
27 # For using rsh it is necessary to have in the ${HOME} directory a .rhosts file
28 # Warning : on RedHat the file /etc/hosts contains by default a line like :
29 # 127.0.0.1               bordolex bordolex.paris1.matra-dtv.fr localhost.localdomain localhost  
30 #   (bordolex is the station name). omniNames on bordolex will be accessible from other
31 #   computers only if the computer name is removed on that line like :
32 #   127.0.0.1               bordolex.paris1.matra-dtv.fr localhost.localdomain localhost
33
34 # To start dynamically Containers on several computers you need to
35 # put in the ${OMNIORB_CONFIG} file a computer name instead of "localhost"
36 # example : ORBInitRef NameService=corbaname::dm2s0017
37
38 # If you need to use several omniNames running on the same computer, you have to :
39 #1. put in your ${OMNIORB_CONFIG} file a computer name and port number
40 # example : ORBInitRef NameService=corbaname::dm2s0017:1515
41 #2. start omninames with this port number in runNS.sh
42 # example : omniNames -start 1515 -logdir ${BaseDir}/logs/${Username} &
43
44 echo ok
45 echo "to list contexts and objects bound int the context with the specified name : showNS "