# --- 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
# --- 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
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}
"""
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
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] != '/':
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)
#
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
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)