From fc4e03d559aaaf93347d9d898a586262f58b5a5f Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Thu, 13 Jun 2019 11:44:12 -0700 Subject: [PATCH] Fixes #10609: Properly set BSD options for /etc/exports Prior to this commit, the BSD options for the /etc/exports file was not properly set up in the correct order for a given entry. It was however fixed for FreeBSD, but never for the original exports template. This commit fixes that by unifying the BSD and FreeBSD templates. --- plugins/hosts/bsd/cap/nfs.rb | 2 +- plugins/hosts/freebsd/cap/nfs.rb | 2 +- templates/nfs/exports.erb | 5 ----- templates/nfs/{exports_freebsd.erb => exports_bsd.erb} | 0 4 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 templates/nfs/exports.erb rename templates/nfs/{exports_freebsd.erb => exports_bsd.erb} (100%) diff --git a/plugins/hosts/bsd/cap/nfs.rb b/plugins/hosts/bsd/cap/nfs.rb index 713479eae..c872b4e24 100644 --- a/plugins/hosts/bsd/cap/nfs.rb +++ b/plugins/hosts/bsd/cap/nfs.rb @@ -120,7 +120,7 @@ module VagrantPlugins end def self.nfs_exports_template(environment) - "nfs/exports" + "nfs/exports_bsd" end def self.nfs_installed(environment) diff --git a/plugins/hosts/freebsd/cap/nfs.rb b/plugins/hosts/freebsd/cap/nfs.rb index 452dd20b3..ea723dd79 100644 --- a/plugins/hosts/freebsd/cap/nfs.rb +++ b/plugins/hosts/freebsd/cap/nfs.rb @@ -19,7 +19,7 @@ module VagrantPlugins end def self.nfs_exports_template(environment) - "nfs/exports_freebsd" + "nfs/exports_bsd" end def self.nfs_restart_command(environment) diff --git a/templates/nfs/exports.erb b/templates/nfs/exports.erb deleted file mode 100644 index 57741e420..000000000 --- a/templates/nfs/exports.erb +++ /dev/null @@ -1,5 +0,0 @@ -# VAGRANT-BEGIN: <%= user %> <%= uuid %> -<% folders.each do |dirs, opts| %> -<%= dirs.map { |d| "\"#{d}\"" }.join(" ") %> <%= ips.join(" ") %> <%=opts[:bsd__compiled_nfs_options] %> -<% end %> -# VAGRANT-END: <%= user %> <%= uuid %> diff --git a/templates/nfs/exports_freebsd.erb b/templates/nfs/exports_bsd.erb similarity index 100% rename from templates/nfs/exports_freebsd.erb rename to templates/nfs/exports_bsd.erb