Добавлена переменная указывающая cache= при монтировании cifs

master-3.5 3.5.2
parent 95147f7427
commit dcf6da8dbf

@ -285,17 +285,18 @@ class Client(commandServer, encrypt, Desktop):
nomapposix = "" nomapposix = ""
else: else:
nomapposix = ",nomapposix" nomapposix = ",nomapposix"
cache_method = self.clVars.Get('cl_cifs_cache')
if not uid is None: if not uid is None:
# mount by uid # mount by uid
p = process(mountCmd, "-t", "cifs", "-o", p = process(mountCmd, "-t", "cifs", "-o",
"cache=loose,user=%s,uid=%d,gid=%d,noperm%s" % ( "cache=%s,user=%s,uid=%d,gid=%d,noperm%s" % (
userName, uid, gid, nomapposix), cache_method, userName, uid, gid, nomapposix),
"//%s/%s" % (host, res), rpath, "//%s/%s" % (host, res), rpath,
envdict={"PASSWD": userPwd}, stderr=STDOUT) envdict={"PASSWD": userPwd}, stderr=STDOUT)
return p.success() return p.success()
else: else:
p = process(mountCmd, "-t", "cifs", "-o", p = process(mountCmd, "-t", "cifs", "-o",
"cache=loose,user=%s%s" % (userName, nomapposix), "cache=%s,user=%s%s" % (cache_method, userName, nomapposix),
"//%s/%s" % (host, res), rpath, "//%s/%s" % (host, res), rpath,
envdict={"PASSWD": userPwd}, stderr=STDOUT) envdict={"PASSWD": userPwd}, stderr=STDOUT)
return p.success() return p.success()

@ -724,6 +724,13 @@ class VariableClCifsVer(ReadonlyVariable):
return readFile("/sys/module/cifs/version") return readFile("/sys/module/cifs/version")
class VariableClCifsCache(Variable):
"""
Параметр cache= при монтировании cifs
"""
value = "loose"
class VariableClRsyncVer(ReadonlyVariable): class VariableClRsyncVer(ReadonlyVariable):
""" """
Версия rsync Версия rsync

Loading…
Cancel
Save