Put nfs opts setup in separate function and configured to be called by both generic linux and arch nfs_options. Fixes undefined method join exception in arch

This commit is contained in:
David 2013-09-10 11:39:41 -04:00
parent 15b38be1ef
commit d3ab29e279
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,7 @@ module VagrantPlugins
end end
def nfs_export(id, ips, folders) def nfs_export(id, ips, folders)
nfs_opts_setup(folders)
output = TemplateRenderer.render('nfs/exports_linux', output = TemplateRenderer.render('nfs/exports_linux',
:uuid => id, :uuid => id,
:ips => ips, :ips => ips,

View File

@ -36,7 +36,7 @@ module VagrantPlugins
end end
end end
def nfs_export(id, ips, folders) def nfs_opts_setup(folders)
folders.each do |k, opts| folders.each do |k, opts|
if !opts[:linux__nfs_options] if !opts[:linux__nfs_options]
opts[:linux__nfs_options] ||= ["rw", "no_subtree_check", "all_squash"] opts[:linux__nfs_options] ||= ["rw", "no_subtree_check", "all_squash"]
@ -55,7 +55,10 @@ module VagrantPlugins
opts[:linux__nfs_options] << "anongid=#{opts[:map_gid]}" if !hasgid opts[:linux__nfs_options] << "anongid=#{opts[:map_gid]}" if !hasgid
opts[:linux__nfs_options] << "fsid=#{opts[:uuid]}" opts[:linux__nfs_options] << "fsid=#{opts[:uuid]}"
end end
end
def nfs_export(id, ips, folders)
nfs_opts_setup(folders)
output = TemplateRenderer.render('nfs/exports_linux', output = TemplateRenderer.render('nfs/exports_linux',
:uuid => id, :uuid => id,
:ips => ips, :ips => ips,