Class: VagrantPlugins::GuestNetBSD::Cap::MountNFSFolder

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-guest-netbsd/cap/mount_nfs_folder.rb

Class Method Summary collapse

Class Method Details

.mount_nfs_folder(machine, ip, folders) ⇒ Object



5
6
7
8
9
10
# File 'lib/vagrant-guest-netbsd/cap/mount_nfs_folder.rb', line 5

def self.mount_nfs_folder(machine, ip, folders)
  folders.each do |name, opts|
    machine.communicate.sudo("mkdir -p #{opts[:guestpath]}")
    machine.communicate.sudo("/sbin/mount -t nfs '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'")
  end
end