- #self.CMD=['omniNames -start ' , aPort , ' -logdir ' , upath , ' &']
- self.CMD=['omniNames','-start' , aPort, '-logdir' , upath, '-errlog', upath+'/omniNameErrors.log']
- #os.system("omniNames -start " + aPort + " -logdir " + upath + " &")
-
- if verbose(): print "... ok"
- if verbose(): print "to list contexts and objects bound into the context with the specified name : showNS "
-
-
- def initArgs(self):
+ # get ip address on default interface (for instance eth0) to limit listening on this interface (cyber security request)
+ from subprocess import check_output
+ ips = check_output(['hostname', '--all-ip-addresses'])
+ if ips.strip():
+ ipDefault = ips.split()[0].decode()
+ else:
+ ip = check_output(['hostname', '--ip-address'])
+ ipDefault = ip.split()[-1].decode()
+ self.CMD = ['omniNames','-start' , aPort]
+ self.CMD += ['-logdir' , upath, '-errlog', upath+'/omniNameErrors.log']
+
+ if verbose(): print("... ok")
+ if verbose(): print("to list contexts and objects bound into the context with the specified name : showNS ")
+
+
+ def initArgs(self):