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

master-3.5 3.5.2
parent 95147f7427
commit dcf6da8dbf

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

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

Loading…
Cancel
Save