Mount NFS folders on the linux system

This commit is contained in:
Mitchell Hashimoto 2010-07-13 22:04:56 -07:00
parent 18d04e8aa3
commit fe430ff006
1 changed files with 11 additions and 0 deletions

View File

@ -52,6 +52,17 @@ module Vagrant
ssh.exec!("sudo chown #{config.ssh.username} #{guestpath}")
end
def mount_nfs(ip, folders)
# TODO: Maybe check for nfs support on the guest, since its often
# not installed by default
folders.each do |name, opts|
vm.ssh.execute do |ssh|
ssh.exec!("sudo mkdir -p #{opts[:guestpath]}")
ssh.exec!("sudo mount #{ip}:#{opts[:hostpath]} #{opts[:guestpath]}")
end
end
end
def prepare_unison(ssh)
ssh.exec!("which unison", :error_key => :unison_not_found)