예제 #1
0
    def mount(self, mount_path, parent_path=None):
        FuseBase.mount(self, mount_path, parent_path)

        res = subprocess.call(
            ["google-drive-ocamlfuse -skiptrash " + mount_path], shell=True)
        if res != 0:
            raise RuntimeError("Cannot mount google_drive filesystem [#" +
                               str(res) + "]")
예제 #2
0
파일: encfs.py 프로젝트: palob/bups
	def mount(self, mount_path, parent_path=None):
		if parent_path is None:
			raise ValueError("EncFS filesystem requires parent path")

		FuseBase.mount(self, mount_path)

		res = subprocess.call(["encfs --standard --extpass=/usr/lib/ssh/ssh-askpass "+parent_path+" "+mount_path], shell=True)
		if res != 0:
			raise RuntimeError("Cannot mount encfs filesystem [#"+str(res)+"]")
예제 #3
0
    def mount(self, mount_path, parent_path=None):
        FuseBase.mount(self, mount_path, parent_path)

        res = subprocess.call(
            ["sshfs " + self.target + ":" + self.path + " " + mount_path],
            shell=True)
        if res != 0:
            raise RuntimeError("Cannot mount sshfs filesystem [#" + str(res) +
                               "]")
예제 #4
0
	def mount(self, mount_path, parent_path=None):
		if parent_path is None:
			raise ValueError("EncFS filesystem requires parent path")

		askpass = "******"
		if not os.path.isfile(askpass):
			raise RuntimeError("Cannot find "+askpass)

		FuseBase.mount(self, mount_path)

		res = subprocess.call(["encfs --standard --extpass="******" "+parent_path+" "+mount_path], shell=True)
		if res != 0:
			raise RuntimeError("Cannot mount encfs filesystem [#"+str(res)+"]")
예제 #5
0
파일: bup.py 프로젝트: emersion/bups
	def mount(self, mount_path, parent_path=None):
		if parent_path is None and self.bup.get_dir() is None:
			raise ValueError("Bup FUSE filesystem requires parent path")

		FuseBase.mount(self, mount_path, parent_path)

		if parent_path is not None:
			self.bup.set_dir(parent_path)

		self.bup.init()

		self.bup.fuse(mount_path, {
			#"stdout": callbacks["onstatus"],
			#"stderr": callbacks["onstatus"]
		})

		time.sleep(1)
예제 #6
0
파일: root.py 프로젝트: emersion/bups
	def mount(self, mount_path, parent_path=None):
		cfg = self.cfg

		if cfg.get("type", "") == "":
			return # Nothing to do

		FuseBase.mount(self, mount_path, parent_path)

		if os.path.ismount(mount_path):
			pass #raise RuntimeError("Filesystem already mounted")
		else:
			cmd = "mount -t "+cfg["type"]+" "+cfg["target"]+" "+mount_path+" -o "+cfg["options"]
			res = sudo(cmd)
			if res == 32:
				pass #raise RuntimeError("Filesystem busy")
			elif res != 0:
				raise RuntimeError("Could not mount "+cfg["type"]+" filesystem [#"+str(res)+"] (command: "+args+")")
예제 #7
0
파일: bup.py 프로젝트: zhanggaoxuan/bups
    def mount(self, mount_path, parent_path=None):
        if parent_path is None and self.bup.get_dir() is None:
            raise ValueError("Bup FUSE filesystem requires parent path")

        FuseBase.mount(self, mount_path, parent_path)

        if parent_path is not None:
            self.bup.set_dir(parent_path)

        self.bup.init()

        self.bup.fuse(
            mount_path,
            {
                #"stdout": callbacks["onstatus"],
                #"stderr": callbacks["onstatus"]
            })

        time.sleep(1)
예제 #8
0
파일: root.py 프로젝트: zhanggaoxuan/bups
    def mount(self, mount_path, parent_path=None):
        cfg = self.cfg

        if cfg.get("type", "") == "":
            return  # Nothing to do

        FuseBase.mount(self, mount_path, parent_path)

        if os.path.ismount(mount_path):
            pass  #raise RuntimeError("Filesystem already mounted")
        else:
            cmd = "mount -t " + cfg["type"] + " " + cfg[
                "target"] + " " + mount_path + " -o " + cfg["options"]
            res = sudo(cmd)
            if res == 32:
                pass  #raise RuntimeError("Filesystem busy")
            elif res != 0:
                raise RuntimeError("Could not mount " + cfg["type"] +
                                   " filesystem [#" + str(res) +
                                   "] (command: " + args + ")")
예제 #9
0
 def __init__(self, cfg):
     FuseBase.__init__(self)
     self.cfg = cfg
예제 #10
0
    def mount(self, mount_path, parent_path=None):
        FuseBase.mount(self, mount_path, parent_path)

        res = subprocess.call(["google-drive-ocamlfuse -skiptrash " + mount_path], shell=True)
        if res != 0:
            raise RuntimeError("Cannot mount google_drive filesystem [#" + str(res) + "]")
예제 #11
0
파일: bup.py 프로젝트: emersion/bups
	def __init__(self, worker):
		FuseBase.__init__(self)

		self.bup = worker
예제 #12
0
파일: encfs.py 프로젝트: palob/bups
	def __init__(self):
		FuseBase.__init__(self)
예제 #13
0
파일: sshfs.py 프로젝트: emersion/bups
	def __init__(self, cfg):
		FuseBase.__init__(self)

		self.target = cfg["target"]
		self.path = cfg.get("path", "")
예제 #14
0
 def __init__(self, cfg):
     FuseBase.__init__(self)
     self.cfg = cfg
예제 #15
0
	def __init__(self):
		FuseBase.__init__(self)
예제 #16
0
파일: bup.py 프로젝트: zhanggaoxuan/bups
    def __init__(self, worker):
        FuseBase.__init__(self)

        self.bup = worker
예제 #17
0
    def __init__(self, cfg):
        FuseBase.__init__(self)

        self.target = cfg["target"]
        self.path = cfg.get("path", "")
예제 #18
0
파일: sshfs.py 프로젝트: emersion/bups
	def mount(self, mount_path, parent_path=None):
		FuseBase.mount(self, mount_path, parent_path)

		res = subprocess.call(["sshfs "+self.target+":"+self.path+" "+mount_path], shell=True)
		if res != 0:
			raise RuntimeError("Cannot mount sshfs filesystem [#"+str(res)+"]")