Merge branch 'master' of git.calculate.ru:/calculate-client

master3.3
Самоукин Алексей 14 years ago
commit 8fd3d24d51

@ -1756,6 +1756,11 @@ class client(share, commandServer, encrypt):
self.clVars.Set("cl_action", "install", True)
domain = self.clVars.Get("cl_remote_host")
self.clVars.AppendToList("cl_merges", __app__, force=True)
# Добавление программы в инсталяционную переменную
if not appendProgramToEnvFile(__app__, self.clVars):
self.printERROR(_("Can not save '%s'") %__app__ + " " +\
_("to %s") %self.clVars.Get("cl_env_path")[0])
return False
if domain:
if not self.addDaemonAutostart("client"):
return False
@ -1764,11 +1769,6 @@ class client(share, commandServer, encrypt):
if not self.applyTemplatesFromSystem():
self.printERROR(_("Can not apply install templates"))
return False
# Добавление программы в инсталяционную переменную
if not appendProgramToEnvFile(__app__, self.clVars):
self.printERROR(_("Can not save '%s'") %__app__ + " " +\
_("to %s") %self.clVars.Get("cl_env_path")[0])
return False
if domain:
self.printOK(_("To be used domain profile") + " ...")
else:
@ -1797,17 +1797,17 @@ class client(share, commandServer, encrypt):
self.clVars.Set("cl_action", "uninstall", True)
# Удаляем переменные из env файлов
self.removeVars()
if not self.applyTemplatesFromSystem():
self.printERROR(_("Can not apply uninstall templates"))
return False
if not self.delDaemonAutostart("client"):
return False
# Удаление программы из инсталяционной переменной
if not removeProgramToEnvFile(__app__, self.clVars):
self.printERROR(_("Can not remove '%(app)s' from %(path)s")%
{'app':__app__,
'path':self.clVars.Get("cl_env_path")[0]})
return False
if not self.applyTemplatesFromSystem():
self.printERROR(_("Can not apply uninstall templates"))
return False
if not self.delDaemonAutostart("client"):
return False
self.printOK(_("Apply uninstall templates"))
return True

@ -21,28 +21,26 @@ class fillVars():
def get_cl_client_domain_action(self):
"""переключатель для шаблонов входа и выхода из домена"""
ret = ""
if "calculate-client" in self.GetList("cl_merges"):
action = self.Get("cl_action")
remoteHost = self.Get("cl_remote_host")
remoteAuth = self.Get("os_remote_auth")
if action == "domain":
action = self.Get("cl_action")
remoteHost = self.Get("cl_remote_host")
remoteAuth = self.Get("os_remote_auth")
if action == "domain":
ret = "up"
elif action in ("undomain", "uninstall"):
ret = "down"
elif action in ("install", "merge"):
if remoteHost and remoteAuth:
ret = "up"
elif action in ("undomain", "uninstall"):
else:
ret = "down"
elif action in ("install", "merge"):
if remoteHost and remoteAuth:
ret = "up"
else:
ret = "down"
return ret
def get_cl_client_merge_action(self):
"""переключатель для шаблонов merge"""
ret = ""
if "calculate-client" in self.GetList("cl_merges"):
action = self.Get("cl_action")
remoteHost = self.Get("cl_remote_host")
remoteAuth = self.Get("os_remote_auth")
if action in ("merge","install","uninstall","domain","undomain"):
ret = "up"
action = self.Get("cl_action")
remoteHost = self.Get("cl_remote_host")
remoteAuth = self.Get("os_remote_auth")
if action in ("merge","install","uninstall","domain","undomain"):
ret = "up"
return ret

Loading…
Cancel
Save