def __init__(self, username, password, ip, more_args=None): self._username = username self._password = password self._hostname = NUAUTH_HOST if not more_args: more_args = tuple() self._more_args = more_args self.ip = IP(ip) Process.__init__(self, NUTCPC_PROG) home = getenv('HOME') self.setenv('HOME', home) self.updateArgs()
def __init__(self, debug_level=9): arg = ["-" + "v" * min(max(debug_level, 1), 9)] program = NUAUTH_PROG if USE_VALGRIND: #arg = ["--tool=callgrind", program] + arg #program = "valgrind" arg = ["--log-file-exactly=nuauth.valgrind.log", "--verbose", program] + arg program = "valgrind" Process.__init__(self, program, arg) self.hostname = "localhost" self.need_reload = False self.nufw_port = 4128 self.client_port = 4129 self.config_dirty = False self.need_restart = False if self.isReady(): raise RuntimeError("nuauth is already running!")
def __init__(self, debug_level=9): arg = ["-" + "v" * min(max(debug_level, 1), 9)] program = NUAUTH_PROG if USE_VALGRIND: #arg = ["--tool=callgrind", program] + arg #program = "valgrind" arg = [ "--log-file-exactly=nuauth.valgrind.log", "--verbose", program ] + arg program = "valgrind" Process.__init__(self, program, arg) self.hostname = "localhost" self.need_reload = False self.nufw_port = 4128 self.client_port = 4129 self.config_dirty = False self.need_restart = False if self.isReady(): raise RuntimeError("nuauth is already running!")
def __init__(self, moreargs=None): self.args = moreargs self.is_connected_to_nuauth = False args = ["-"+"v"*DEBUG_LEVEL] if not moreargs or not "-d" in list(moreargs): args = args + ["-d", config.get("nuauth", "host")] if not moreargs or not "-k" in list(moreargs): args = args + ["-k", abspath(config.get("nufw", "tlskey"))] if not moreargs or not "-c" in list(moreargs): args = args + ["-c", abspath(config.get("nufw", "tlscert"))] if not moreargs or not "-a" in list(moreargs): args = args + ["-a", abspath(config.get("nufw", "cacert"))] if moreargs: args += list(moreargs) program = NUFW_PROG if USE_VALGRIND: args = ["--log-file-exactly=nufw.valgrind.log", "--verbose", program] + args program = "valgrind" Process.__init__(self, program, args)
def __init__(self, moreargs=None): self.args = moreargs self.is_connected_to_nuauth = False args = ["-" + "v" * DEBUG_LEVEL] if not moreargs or not "-d" in list(moreargs): args = args + ["-d", config.get("nuauth", "host")] if not moreargs or not "-k" in list(moreargs): args = args + ["-k", abspath(config.get("nufw", "tlskey"))] if not moreargs or not "-c" in list(moreargs): args = args + ["-c", abspath(config.get("nufw", "tlscert"))] if not moreargs or not "-a" in list(moreargs): args = args + ["-a", abspath(config.get("nufw", "cacert"))] if moreargs: args += list(moreargs) program = NUFW_PROG if USE_VALGRIND: args = [ "--log-file-exactly=nufw.valgrind.log", "--verbose", program ] + args program = "valgrind" Process.__init__(self, program, args)
def exited(self, status): if USE_VALGRIND: print "Callgrind logs written in callgrind.out.%s" % self.pid Process.exited(self, status)