From 6e96ec6bfcf11b87afd64dbbb49199e615141f60 Mon Sep 17 00:00:00 2001 From: prascle Date: Fri, 28 May 2004 15:25:03 +0000 Subject: [PATCH] PR : hostname must be without domain extensions (as in hostname -s) --- src/Container/SALOME_ComponentPy.py | 4 +++- src/LifeCycleCORBA/LifeCycleCORBA.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Container/SALOME_ComponentPy.py b/src/Container/SALOME_ComponentPy.py index 2c2a5d0f1..37b00188e 100755 --- a/src/Container/SALOME_ComponentPy.py +++ b/src/Container/SALOME_ComponentPy.py @@ -31,6 +31,7 @@ import os import sys import time +import string from omniORB import CORBA, PortableServer import Engines, Engines__POA import Registry @@ -73,7 +74,8 @@ class SALOME_ComponentPy_i (Engines__POA.Component): self._Executed = 0 naming_service = SALOME_NamingServicePy_i(self._orb) - Component_path = "/Containers/" + os.getenv( "HOSTNAME" ) + "/" + self._containerName + "/" + self._interfaceName + myMachine=string.split(os.getenv( "HOSTNAME" ),'.') + Component_path = "/Containers/" + myMachine[0] + "/" + self._containerName + "/" + self._interfaceName MESSAGE( 'SALOME_ComponentPy_i Register' + str( Component_path ) ) naming_service.Register(self._this(), Component_path) diff --git a/src/LifeCycleCORBA/LifeCycleCORBA.py b/src/LifeCycleCORBA/LifeCycleCORBA.py index fe19bfdff..448491864 100644 --- a/src/LifeCycleCORBA/LifeCycleCORBA.py +++ b/src/LifeCycleCORBA/LifeCycleCORBA.py @@ -29,6 +29,7 @@ import os import sys import time +import string from omniORB import CORBA import CosNaming import Engines @@ -133,7 +134,8 @@ class LifeCycleCORBA: aContainer = self.FindContainer( theComputer + "/" + theContainer ) if aContainer is None : if (theContainer == "FactoryServer") | (theContainer == "FactoryServerPy") : - if theComputer == os.getenv("HOSTNAME") : + myMachine=string.split(os.getenv( "HOSTNAME" ),'.') + if theComputer == myMachine[0] : rshstr = "" else : rshstr = "rsh -n " + theComputer + " " -- 2.39.2