vaguerent/plugins/guests/freebsd/cap/mount_nfs_folder.rb
Mark Peek d5dcf84d62 Allow the FreeBSD plugin to install without bash [GH-2485]
The default shell is "bash -l" which does not get installed by default
on FreeBSD. This change allows the plugin to override the default shell
and use a known installed shell (sh).
2013-11-22 15:30:12 -08:00

15 lines
442 B
Ruby

module VagrantPlugins
module GuestFreeBSD
module Cap
class MountNFSFolder
def self.mount_nfs_folder(machine, ip, folders)
folders.each do |name, opts|
machine.communicate.sudo("mkdir -p #{opts[:guestpath]}", {:shell => "sh"})
machine.communicate.sudo("mount -t nfs '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'", {:shell => "sh"})
end
end
end
end
end
end