]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Modifications for CCRT cluster: use .omniORB_last.cfg instead of .omniORB_{host}_last.cfg
authorjfa <jfa@opencascade.com>
Mon, 27 Nov 2006 11:53:39 +0000 (11:53 +0000)
committerjfa <jfa@opencascade.com>
Mon, 27 Nov 2006 11:53:39 +0000 (11:53 +0000)
bin/appliskel/killCurrentPort
bin/appliskel/runSession
bin/appliskel/searchFreePort.sh
bin/killSalomeWithPort.py
bin/runSalome.py
bin/salome_session.py

index 5d0a547cc62449edb39d18ddbc6f66612e9418d1..e1eb19268841407a2ff193bcd24ab5147497697f 100755 (executable)
 
 # --- find omniORB configuration relative to current session if any
 
-myhost=`hostname`
-fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+fileOmniConfig=${HOME}/${APPLI}/.omniORB_last.cfg
 
 if [ -f $fileOmniConfig ]; then
-  OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+  OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_last.cfg
   export OMNIORB_CONFIG
 fi
 
index 69573bf10ec71d233e40e37c9e9ba2f673512471..9f3b0e4f9b05507e78d51c74476449235d5eb8c3 100755 (executable)
@@ -17,11 +17,10 @@ APPLI_HOME=`dirname $0`
 
 # --- set omniORB configuration to current session if any
 
-myhost=`hostname`
-fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+fileOmniConfig=${HOME}/${APPLI}/.omniORB_last.cfg
 
 if [ -f $fileOmniConfig ]; then
-  OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+  OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_last.cfg
   export OMNIORB_CONFIG
 
   # --- set environment variables for port and hostname of NamingService
index d638045005e4840f7cc296e2a103c74314774d68..a45eb4dea5baa5bfd0070bb9cc915c7baa88119f 100755 (executable)
@@ -41,7 +41,7 @@ searchFreePort() {
             local initref="NameService=corbaname::"`hostname`":$NSPORT"
             #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
             echo "InitRef = $initref" > $OMNIORB_CONFIG
-            LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+            LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_last.cfg
             export LAST_RUNNING_CONFIG
            rm ${LAST_RUNNING_CONFIG}
             ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
index 2bfec7561c361babc909ca1bbcdeba04af7966b0..60e166d15e2ea2c494335b8b136d1b9134787268 100755 (executable)
@@ -46,7 +46,7 @@ def appliCleanOmniOrbConfig(port):
     """
     remove omniorb config files related to the port in SALOME application:
     - ${HOME}/${APPLI}/.omniORB_${HOSTNAME}_${NSPORT}.cfg
-    - ${HOME}/${APPLI}/.omniORB_${HOSTNAME}_last.cfg
+    - ${HOME}/${APPLI}/.omniORB_last.cfg
     the last is removed only if the link points to the first file.
     """
     from Utils_Identity import getShortHostName
@@ -59,7 +59,7 @@ def appliCleanOmniOrbConfig(port):
         home='%s/%s'%(home,appli)
         hostname=getShortHostName()
         omniorb_config = '%s/.omniORB_%s_%s.cfg'%(home,hostname, str(port))
-        last_running_config = '%s/.omniORB_%s_last.cfg'%(home, hostname)
+        last_running_config = '%s/.omniORB_last.cfg'%(home)
         if os.access(last_running_config,os.F_OK):
             pointedPath = os.readlink(last_running_config)
             if pointedPath[0] != '/':
index c62a0aee97ba029b233072a4a456ecd889518290..424c00e3224cda4dbf9d39adf3a1f7ab42170fa7 100755 (executable)
@@ -887,6 +887,10 @@ def searchFreePort(args, save_config=0):
             system('rm -f %s'%(tmp_file))
             #
             home = os.environ['HOME']
+            appli=os.environ.get("APPLI")
+            if appli is not None:
+                home='%s/%s'%(home,appli)
+                pass
             #
             os.environ['OMNIORB_CONFIG'] = '%s/.omniORB_%s_%s.cfg'%(home, myhost, NSPORT)
             initref = "NameService=corbaname::%s:%s"%(myhost, NSPORT)
@@ -903,7 +907,7 @@ def searchFreePort(args, save_config=0):
             #
             if save_config:
                 from os import system
-                system('ln -sf %s %s/.omniORB_current.cfg'%(os.environ['OMNIORB_CONFIG'], home))
+                system('ln -sf %s %s/.omniORB_last.cfg'%(os.environ['OMNIORB_CONFIG'], home))
                 pass
             #
             break
index d43e144a7e67874f9f9c6273846dc01965f61828..870b53bc4c1ca397f5aab53bc47266fce20170dc 100644 (file)
@@ -63,7 +63,7 @@ def searchFreePort():
             f = open(omniorb_config, "w")
             f.write("ORBInitRef NameService=corbaname::%s:%s\n"%(hostname, NSPORT))
             f.close()
-            last_running_config = '%s/.omniORB_%s_last.cfg'%(home, hostname)
+            last_running_config = '%s/.omniORB_last.cfg'%(home, hostname)
             os.environ['LAST_RUNNING_CONFIG'] = last_running_config
             if os.access(last_running_config,os.F_OK):
                 os.unlink(last_running_config)