Исправлено использование переменных домена

sr_samba_host, cl_remote_ftp
master-3.5 3.5.4.1
parent 2cf6b3915c
commit 8734311aed

@ -460,20 +460,22 @@ class VariableClClientUserMountData(ReadonlyTableVariable):
def get(self, hr=HumanReadable.No): def get(self, hr=HumanReadable.No):
home = path.split(self.Get('ur_home_path'))[0] home = path.split(self.Get('ur_home_path'))[0]
envFile = self.Get('cl_env_server_path') envFile = self.Get('cl_env_server_path')
samba_host = self.Get('sr_samba_host')
ftp_host = convertEnv().getVar("ftp", "host")
def generate(): def generate():
yield ( yield (
"share", "share", path.join(self.Get('ur_home_path'), "Share"), "share", "share", path.join(self.Get('ur_home_path'), "Share"),
self.Get('cl_remote_host')) samba_host)
yield ( yield (
"unix", "unix", path.join(home, ".%s" % self.Get('ur_login')), "unix", "unix", path.join(home, ".%s" % self.Get('ur_login')),
self.Get('cl_remote_host')) samba_host)
yield ( yield (
"homes", "homes", path.join(self.Get('ur_home_path'), "Home"), "homes", "homes", path.join(self.Get('ur_home_path'), "Home"),
self.Get('cl_remote_host')) samba_host)
if convertEnv().getVar("ftp", "host"): if ftp_host:
yield ("ftp", "ftp", path.join(self.Get('ur_home_path'), "FTP"), yield ("ftp", "ftp", path.join(self.Get('ur_home_path'), "FTP"),
self.Get('cl_remote_host')) ftp_host)
else: else:
yield ("ftp", '', '', '') yield ("ftp", '', '', '')
if self.Get('cl_replication_host'): if self.Get('cl_replication_host'):
@ -750,3 +752,10 @@ class VariableClSyncMovedSet(Variable):
""" """
type = "bool" type = "bool"
value = "on" value = "on"
class VariableSrSambaHost(Variable):
"""
Хост на котором находятся samba ресурсы
"""
def get(self):
return self.Get('cl_remote_host') or ''

Loading…
Cancel
Save