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|
|
2014-05-22 16:35:12 +00:00
|
|
|
machine.communicate.sudo(<<CMDS, {shell: "sh"})
|
2014-01-14 06:25:35 +00:00
|
|
|
set -e
|
|
|
|
mkdir -p #{opts[:guestpath]}
|
|
|
|
/sbin/mount -t nfs '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'
|
|
|
|
CMDS
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|