From dcf6da8dbfaca1bf5536deeec692025eeaf6d8ab 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, 28 Feb 2017 17:01:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D1=83=D0=BA=D0=B0=D0=B7=D1=8B=D0=B2=D0=B0=D1=8E?= =?UTF-8?q?=D1=89=D0=B0=D1=8F=20cache=3D=20=D0=BF=D1=80=D0=B8=20=D0=BC?= =?UTF-8?q?=D0=BE=D0=BD=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B8=20cifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/client/client.py | 7 ++++--- pym/client/variables/client.py | 7 +++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pym/client/client.py b/pym/client/client.py index 9b14145..783be31 100644 --- a/pym/client/client.py +++ b/pym/client/client.py @@ -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() diff --git a/pym/client/variables/client.py b/pym/client/variables/client.py index 9923629..9c9793e 100644 --- a/pym/client/variables/client.py +++ b/pym/client/variables/client.py @@ -724,6 +724,13 @@ class VariableClCifsVer(ReadonlyVariable): return readFile("/sys/module/cifs/version") +class VariableClCifsCache(Variable): + """ + Параметр cache= при монтировании cifs + """ + value = "loose" + + class VariableClRsyncVer(ReadonlyVariable): """ Версия rsync