Sha256: fdd7af9fbbf1424a2d64bbc57b819f84efa3fd1020cf54cc92f39280b490635a
Contents?: true
Size: 1.24 KB
Versions: 7
Compression:
Stored size: 1.24 KB
Contents
require_relative "../../../synced_folders/unix_mount_helpers" module VagrantPlugins module ProviderVirtualBox module Cap module MountOptions extend VagrantPlugins::SyncedFolder::UnixMountHelpers VB_MOUNT_TYPE = "vboxsf".freeze # Returns mount options for a virtual box synced folder # # @param [Machine] machine # @param [String] name of mount # @param [String] path of mount on guest # @param [Hash] hash of mount options def self.mount_options(machine, name, guest_path, options) mount_options = options.fetch(:mount_options, []) detected_ids = detect_owner_group_ids(machine, guest_path, mount_options, options) mount_uid = detected_ids[:uid] mount_gid = detected_ids[:gid] mount_options << "uid=#{mount_uid}" mount_options << "gid=#{mount_gid}" mount_options << "_netdev" mount_options = mount_options.join(',') return mount_options, mount_uid, mount_gid end def self.mount_type(machine) return VB_MOUNT_TYPE end def self.mount_name(machine, name, data) name.gsub(/[\s\/\\]/,'_').sub(/^_/, '') end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems