diff --git a/plugins/kernel_v2/config/nfs.rb b/plugins/kernel_v2/config/nfs.rb deleted file mode 100644 index 21e7ea7bf..000000000 --- a/plugins/kernel_v2/config/nfs.rb +++ /dev/null @@ -1,14 +0,0 @@ -require "vagrant" - -module VagrantPlugins - module Kernel_V2 - class NFSConfig < Vagrant.plugin("2", :config) - attr_accessor :map_uid - attr_accessor :map_gid - - def to_s - "NFS" - end - end - end -end diff --git a/plugins/kernel_v2/plugin.rb b/plugins/kernel_v2/plugin.rb index 55cfcc0dc..0904481df 100644 --- a/plugins/kernel_v2/plugin.rb +++ b/plugins/kernel_v2/plugin.rb @@ -20,11 +20,6 @@ module VagrantPlugins SSHConfig end - config("nfs") do - require File.expand_path("../config/nfs", __FILE__) - NFSConfig - end - config("package") do require File.expand_path("../config/package", __FILE__) PackageConfig diff --git a/plugins/synced_folders/nfs/config.rb b/plugins/synced_folders/nfs/config.rb new file mode 100644 index 000000000..d842f78b1 --- /dev/null +++ b/plugins/synced_folders/nfs/config.rb @@ -0,0 +1,26 @@ +require "vagrant" + +module VagrantPlugins + module SyncedFolderNFS + class Config < Vagrant.plugin("2", :config) + attr_accessor :map_uid + attr_accessor :map_gid + + def initialize + super + + @map_uid = UNSET_VALUE + @map_gid = UNSET_VALUE + end + + def finalize! + @map_uid = nil if @map_uid == UNSET_VALUE + @map_gid = nil if @map_gid == UNSET_VALUE + end + + def to_s + "NFS" + end + end + end +end diff --git a/plugins/synced_folders/nfs/plugin.rb b/plugins/synced_folders/nfs/plugin.rb index 131d043a1..b6f1fa491 100644 --- a/plugins/synced_folders/nfs/plugin.rb +++ b/plugins/synced_folders/nfs/plugin.rb @@ -9,7 +9,12 @@ module VagrantPlugins implementation. EOF - synced_folder(:nfs, 5) do + config("nfs") do + require File.expand_path("../config", __FILE__) + Config + end + + synced_folder("nfs", 5) do require File.expand_path("../synced_folder", __FILE__) SyncedFolder end