]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
use specila function from Util_Identity to get name of host
authorptv <ptv@opencascade.com>
Tue, 16 May 2006 07:27:34 +0000 (07:27 +0000)
committerptv <ptv@opencascade.com>
Tue, 16 May 2006 07:27:34 +0000 (07:27 +0000)
bin/killSalomeWithPort.py
bin/nameserver.py
bin/runNS.py
bin/runSalome.py
src/TestContainer/TestComponentPy.py

index b26c6ca28abaca7326a61956332642915b9ce0ca..6ff6b30348bdd653bfe21e11858209823a55d74c 100755 (executable)
@@ -4,11 +4,13 @@ import os, sys, pickle, signal, commands
 def getPiDict(port,appname='salome',full=True):
     from Utils_Identity import getShortHostName
 
-    host = os.getenv("HOSTNAME")
+    # get hostname by special function in all cases to
+    # have always same result in lower case at win32
+    host = getShortHostName()
     if not host:
-        host = os.getenv("HOST")
+        host = os.getenv("HOSTNAME")
     if not host:
-        host = getShortHostName()
+        host = os.getenv("HOST")
 
     filedict = []
     filedict.append( os.getenv('USER') )          # user name
index 155a323f486b719f534110a95f909a3cbd07d17c..1db35862ddac10e993b68001254bfe3e320de9f3 100755 (executable)
@@ -3,6 +3,7 @@
 import sys, os, re
 #import commands
 from server import *
+from Utils_Identity import getShortHostName
 
 # -----------------------------------------------------------------------------
 
@@ -45,7 +46,8 @@ class NamingServer(Server):
        #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
 
        print "Name Service... "
-       hname=os.environ["HOST"] #commands.getoutput("hostname")
+       #hname=os.environ["HOST"] #commands.getoutput("hostname")
+        hname=getShortHostName()
        print "hname=",hname
        
        f=open(os.environ["OMNIORB_CONFIG"])
index 06edc0226ff54f52bf5921859fa49bc32132cf33..1059aa1b1ea86b607e7941cefd0313b0b2e0cfab 100755 (executable)
@@ -3,6 +3,7 @@
 #log files localization
 
 import os, commands, sys, re
+from Utils_Identity import getShortHostName
 
 if sys.platform == "win32":
        # temporarily using home directory for Namning Service logs
@@ -43,7 +44,9 @@ def startOmni():
        #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
 
        print "Name Service... "
-       hname=os.environ["HOST"] #commands.getoutput("hostname")
+       #hname=os.environ["HOST"] #commands.getoutput("hostname")
+        hname=getShortHostName()
+
        print "hname=",hname
        
        f=open(os.environ["OMNIORB_CONFIG"])
index 434169c86c3603413348193be3ac2b2bb533f218..a93e92db57bafe089b856e925d750524eea087ff 100755 (executable)
@@ -428,10 +428,10 @@ def startSalome(args, modules_list, modules_root_dir):
     from Utils_Identity import getShortHostName
     
     if os.getenv("HOSTNAME") == None:
-        if os.getenv("HOST") == None:
+        #if os.getenv("HOST") == None:
             os.environ["HOSTNAME"]=getShortHostName()
-        else:
-            os.environ["HOSTNAME"]=os.getenv("HOST")
+        #else:
+        #    os.environ["HOSTNAME"]=os.getenv("HOST")
 
     theComputer = getShortHostName()
     
index 2dacf6dbbd5e886165a12cbda5abebbef970e5d8..e56cbda95d78cb6732ddf8a4f049959ff0436779 100755 (executable)
@@ -34,6 +34,7 @@ import string
 from omniORB import CORBA
 import CosNaming
 import Engines
+from Utils_Identity import getShortHostName
 
 
 #initialise the ORB
@@ -48,8 +49,7 @@ if rootContext is None:
     sys.exit(1)
 
 #resolve the name /Containers.dir/FactoryServerPy.object
-myMachine=string.split(os.getenv( "HOSTNAME" ),'.')
-machineName= myMachine[0]
+machineName=getShortHostName()
 containerName = "FactoryServerPy"
 name = [CosNaming.NameComponent("Containers","dir"),
         CosNaming.NameComponent(machineName,"dir"),