Module: VagrantPlugins::Utm::Cap::MountOptions
- Extended by:
- SyncedFolder::UnixMountHelpers
- Defined in:
- lib/vagrant_utm/cap/mount_options.rb
Overview
Capability for mount options
Constant Summary collapse
- UTM_MOUNT_TYPE =
Mount type for VirtFS
"9p"
Class Method Summary collapse
- .mount_name(_machine, name, _data) ⇒ Object
-
.mount_options(machine, _name, guest_path, options) ⇒ Object
Returns mount options for a utm synced folder.
- .mount_type(_machine) ⇒ Object
Methods included from SyncedFolder::UnixMountHelpers
detect_owner_group_ids, emit_upstart_notification, extended, find_mount_options_id, merge_mount_options
Class Method Details
.mount_name(_machine, name, _data) ⇒ Object
49 50 51 |
# File 'lib/vagrant_utm/cap/mount_options.rb', line 49 def self.mount_name(_machine, name, _data) name.gsub(%r{[\s/\\]}, "_").sub(/^_/, "") end |
.mount_options(machine, _name, guest_path, options) ⇒ Object
Returns mount options for a utm synced folder
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/vagrant_utm/cap/mount_options.rb', line 24 def self.(machine, _name, guest_path, ) = .fetch(:mount_options, []) detected_ids = detect_owner_group_ids(machine, guest_path, , ) mount_uid = detected_ids[:uid] mount_gid = detected_ids[:gid] # VirtFS mount options << "trans=virtio" << "version=9p2000.L" << if .include?("ro") "ro" else "rw" end << "_netdev" << "nofail" = .join(",") [, mount_uid, mount_gid] end |
.mount_type(_machine) ⇒ Object
45 46 47 |
# File 'lib/vagrant_utm/cap/mount_options.rb', line 45 def self.mount_type(_machine) UTM_MOUNT_TYPE end |