From 8734311aed18aa498ee860963950e88305943718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Tue, 13 Jun 2017 17:20:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20=D0=B4=D0=BE=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sr_samba_host, cl_remote_ftp --- pym/client/variables/client.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pym/client/variables/client.py b/pym/client/variables/client.py index bae158f..a595806 100644 --- a/pym/client/variables/client.py +++ b/pym/client/variables/client.py @@ -460,20 +460,22 @@ class VariableClClientUserMountData(ReadonlyTableVariable): def get(self, hr=HumanReadable.No): home = path.split(self.Get('ur_home_path'))[0] envFile = self.Get('cl_env_server_path') + samba_host = self.Get('sr_samba_host') + ftp_host = convertEnv().getVar("ftp", "host") def generate(): yield ( "share", "share", path.join(self.Get('ur_home_path'), "Share"), - self.Get('cl_remote_host')) + samba_host) yield ( "unix", "unix", path.join(home, ".%s" % self.Get('ur_login')), - self.Get('cl_remote_host')) + samba_host) yield ( "homes", "homes", path.join(self.Get('ur_home_path'), "Home"), - self.Get('cl_remote_host')) - if convertEnv().getVar("ftp", "host"): + samba_host) + if ftp_host: yield ("ftp", "ftp", path.join(self.Get('ur_home_path'), "FTP"), - self.Get('cl_remote_host')) + ftp_host) else: yield ("ftp", '', '', '') if self.Get('cl_replication_host'): @@ -750,3 +752,10 @@ class VariableClSyncMovedSet(Variable): """ type = "bool" value = "on" + +class VariableSrSambaHost(Variable): + """ + Хост на котором находятся samba ресурсы + """ + def get(self): + return self.Get('cl_remote_host') or ''