2014-01-08 05:01:03 +00:00
|
|
|
require "vagrant/util"
|
|
|
|
require "vagrant/util/retryable"
|
|
|
|
|
|
|
|
require Vagrant.source_root.join("plugins", "hosts", "bsd", "cap", "nfs")
|
|
|
|
|
|
|
|
module VagrantPlugins
|
|
|
|
module HostFreeBSD
|
|
|
|
module Cap
|
|
|
|
class NFS
|
|
|
|
def self.nfs_export(environment, ui, id, ips, folders)
|
|
|
|
folders.each do |folder_name, folder_values|
|
|
|
|
if folder_values[:hostpath] =~ /\s+/
|
|
|
|
raise Vagrant::Errors::VagrantError,
|
|
|
|
_key: :freebsd_nfs_whitespace
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
HostBSD::Cap::NFS.nfs_export(environment, ui, id, ips, folders)
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.nfs_exports_template(environment)
|
|
|
|
"nfs/exports_freebsd"
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.nfs_restart_command(environment)
|
2014-01-13 06:34:45 +00:00
|
|
|
["sudo", "/etc/rc.d/mountd", "onereload"]
|
2014-01-08 05:01:03 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|