From d3ab29e27972ea02f41a40ce626ace55511b1842 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 10 Sep 2013 11:39:41 -0400 Subject: [PATCH] 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 --- plugins/hosts/arch/host.rb | 1 + plugins/hosts/linux/host.rb | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/hosts/arch/host.rb b/plugins/hosts/arch/host.rb index abfb22349..92530de63 100644 --- a/plugins/hosts/arch/host.rb +++ b/plugins/hosts/arch/host.rb @@ -24,6 +24,7 @@ module VagrantPlugins end def nfs_export(id, ips, folders) + nfs_opts_setup(folders) output = TemplateRenderer.render('nfs/exports_linux', :uuid => id, :ips => ips, diff --git a/plugins/hosts/linux/host.rb b/plugins/hosts/linux/host.rb index 76b336b61..9c39cfcd4 100644 --- a/plugins/hosts/linux/host.rb +++ b/plugins/hosts/linux/host.rb @@ -36,7 +36,7 @@ module VagrantPlugins end end - def nfs_export(id, ips, folders) + def nfs_opts_setup(folders) folders.each do |k, opts| if !opts[:linux__nfs_options] 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] << "fsid=#{opts[:uuid]}" end + end + def nfs_export(id, ips, folders) + nfs_opts_setup(folders) output = TemplateRenderer.render('nfs/exports_linux', :uuid => id, :ips => ips,