示例#1
0
	def add_mount(self, source, destination, opts=[]):
		"""Associate a mount with this partition
		Automatically mounts it

		:param str,AbstractPartition source: The source of the mount
		:param str destination: The path to the mountpoint
		:param list opts: Any options that should be passed to the mount command
		"""
		# Create a new mount object, mount it if the partition is mounted and put it in the mounts dict
		from mount import Mount
		mount = Mount(source, destination, opts)
		if self.fsm.current == 'mounted':
			mount.mount(self.mount_dir)
		self.mounts[destination] = mount
示例#2
0
    def add_mount(self, source, destination, opts=[]):
        """Associate a mount with this partition
        Automatically mounts it

        :param str,AbstractPartition source: The source of the mount
        :param str destination: The path to the mountpoint
        :param list opts: Any options that should be passed to the mount command
        """
        # Create a new mount object, mount it if the partition is mounted and put it in the mounts dict
        from mount import Mount
        mount = Mount(source, destination, opts)
        if self.fsm.current == 'mounted':
            mount.mount(self.mount_dir)
        self.mounts[destination] = mount