vagrant/plugins/guests/netbsd/cap/mount_nfs_folder.rb

18 lines
406 B
Ruby
Raw Normal View History

2014-01-14 06:25:35 +00:00
module VagrantPlugins
module GuestNetBSD
module Cap
class MountNFSFolder
def self.mount_nfs_folder(machine, ip, folders)
folders.each do |name, opts|
machine.communicate.sudo(<<CMDS, {:shell => "sh"})
set -e
mkdir -p #{opts[:guestpath]}
/sbin/mount -t nfs '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'
CMDS
end
end
end
end
end
end