Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CMake: Sphinx: simplifying Win32 command
[modules/kernel.git]
/
bin
/
killSalomeWithPort.py
diff --git
a/bin/killSalomeWithPort.py
b/bin/killSalomeWithPort.py
index c6c128b234aca035c1ac4104a1e6a2441fca083f..84774cef326c011c1713c1d34f3e1a1c2c56c27b 100755
(executable)
--- a/
bin/killSalomeWithPort.py
+++ b/
bin/killSalomeWithPort.py
@@
-1,6
+1,6
@@
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-201
2
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-201
3
CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-33,7
+33,6
@@
import os, sys, pickle, signal, commands,glob
from salome_utils import verbose
import os, sys, pickle, signal, commands,glob
from salome_utils import verbose
-import Utils_Identity
import salome_utils
def getPiDict(port,appname='salome',full=True,hidden=True,hostname=None):
import salome_utils
def getPiDict(port,appname='salome',full=True,hidden=True,hostname=None):
@@
-82,25
+81,23
@@
def getPiDict(port,appname='salome',full=True,hidden=True,hostname=None):
def appliCleanOmniOrbConfig(port):
"""
Remove omniorb config files related to the port in SALOME application:
def appliCleanOmniOrbConfig(port):
"""
Remove omniorb config files related to the port in SALOME application:
- - ${
HOME}/${APPLI}/USERS
/.omniORB_${USER}_${HOSTNAME}_${NSPORT}.cfg
- - ${
HOME}/${APPLI}/USERS
/.omniORB_${USER}_last.cfg
+ - ${
OMNIORB_USER_PATH}
/.omniORB_${USER}_${HOSTNAME}_${NSPORT}.cfg
+ - ${
OMNIORB_USER_PATH}
/.omniORB_${USER}_last.cfg
the last is removed only if the link points to the first file.
"""
from salome_utils import generateFileName, getUserName
the last is removed only if the link points to the first file.
"""
from salome_utils import generateFileName, getUserName
- home = os.getenv("HOME")
- appli = os.getenv("APPLI")
- if appli is None:
+ omniorbUserPath = os.getenv("OMNIORB_USER_PATH")
+ if omniorbUserPath is None:
#Run outside application context
pass
else:
#Run outside application context
pass
else:
- dir = os.path.join(os.path.realpath(home), appli,"USERS")
- omniorb_config = generateFileName(dir, prefix="omniORB",
+ omniorb_config = generateFileName(omniorbUserPath, prefix="omniORB",
extension="cfg",
hidden=True,
with_username=True,
with_hostname=True,
with_port=port)
extension="cfg",
hidden=True,
with_username=True,
with_hostname=True,
with_port=port)
- last_running_config = generateFileName(
dir
, prefix="omniORB",
+ last_running_config = generateFileName(
omniorbUserPath
, prefix="omniORB",
with_username=True,
suffix="last",
extension="cfg",
with_username=True,
suffix="last",
extension="cfg",
@@
-120,8
+117,7
@@
def appliCleanOmniOrbConfig(port):
if os.path.lexists(last_running_config):return
#try to relink last.cfg to an existing config file if any
if os.path.lexists(last_running_config):return
#try to relink last.cfg to an existing config file if any
- files = glob.glob(os.path.join(os.environ["HOME"],Utils_Identity.getapplipath(),
- "USERS",".omniORB_"+getUserName()+"_*.cfg"))
+ files = glob.glob(os.path.join(omniorbUserPath,".omniORB_"+getUserName()+"_*.cfg"))
current_config=None
current=0
for f in files:
current_config=None
current=0
for f in files:
@@
-148,14
+144,13
@@
def shutdownMyPort(port, cleanup=True):
from salome_utils import generateFileName
# set OMNIORB_CONFIG variable to the proper file
from salome_utils import generateFileName
# set OMNIORB_CONFIG variable to the proper file
- home = os.getenv("HOME")
- appli = os.getenv("APPLI")
+ omniorbUserPath = os.getenv("OMNIORB_USER_PATH")
kwargs = {}
kwargs = {}
- if appli is not None:
- home = os.path.join(os.path.realpath(home), appli,"USERS")
+ if omniorbUserPath is not None:
kwargs["with_username"]=True
kwargs["with_username"]=True
- pass
- omniorb_config = generateFileName(home, prefix="omniORB",
+ else:
+ omniorbUserPath = os.path.realpath(os.path.expanduser('~'))
+ omniorb_config = generateFileName(omniorbUserPath, prefix="omniORB",
extension="cfg",
hidden=True,
with_hostname=True,
extension="cfg",
hidden=True,
with_hostname=True,