diff --git a/pym/cl_client.py b/pym/cl_client.py index 9d48f6b..7757f46 100644 --- a/pym/cl_client.py +++ b/pym/cl_client.py @@ -35,7 +35,8 @@ from cl_datavars import DataVars from cl_print import color_print from cl_ldap import ldapUser from client.progressbar import ProgressBar -from cl_utils import runOsCommand, getpathenv, getModeFile, removeDir, isMount +from cl_utils import runOsCommand, getpathenv, getModeFile, removeDir, isMount,\ + appendProgramToEnvFile, removeProgramToEnvFile from _cl_keys import getKey, clearKey from convertenv import convertEnv from encrypt import encrypt @@ -1465,6 +1466,11 @@ class client(share, commandServer, encrypt): self.printOK(_("To be used domain profile") + " ...") else: self.printOK(_("To be used local profile") + " ...") + # Добавление программы в инсталяционную переменную + if not appendProgramToEnvFile(__app__, self.clVars): + self.printERROR(_("Can not save '%s'") %__app__ + " " +\ + _("to %s") %self.clVars.Get("cl_env_path")[0]) + return False return True def getDefaultRunlevelDaemons(self): @@ -1494,6 +1500,11 @@ class client(share, commandServer, encrypt): return False if not self.delDaemonAutostart("client"): return False + # Удаление программы из инсталяционной переменной + if not removeProgramToEnvFile(__app__, self.clVars): + self.printERROR(_("Can not remove '%s' to %s")%(__app__, + self.clVars.Get("cl_env_path")[0])) + return False # Записываем действие, выведен из домена self.clVars.Write("cl_pass_action", "undomain", True) self.printOK(_("Apply uninstall templates")) diff --git a/pym/cl_vars_client.py b/pym/cl_vars_client.py index 6744da9..b1a4562 100644 --- a/pym/cl_vars_client.py +++ b/pym/cl_vars_client.py @@ -84,4 +84,5 @@ class Data: # Дествие программы - domain,undomain cl_pass_action = {} +