mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Use the MixinSyncedFolders to allow us to comprehend default shared folders implementations
This commit is contained in:
parent
4d89c1440e
commit
b31569b9cb
@ -3,6 +3,8 @@ module VagrantPlugins
|
|||||||
module ProviderLibvirt
|
module ProviderLibvirt
|
||||||
module Action
|
module Action
|
||||||
class PrepareNFSSettings
|
class PrepareNFSSettings
|
||||||
|
include Vagrant::Action::Builtin::MixinSyncedFolders
|
||||||
|
|
||||||
def initialize(app,env)
|
def initialize(app,env)
|
||||||
@app = app
|
@app = app
|
||||||
@logger = Log4r::Logger.new("vagrant::action::vm::nfs")
|
@logger = Log4r::Logger.new("vagrant::action::vm::nfs")
|
||||||
@ -27,7 +29,7 @@ module VagrantPlugins
|
|||||||
# we are not using NFS we don't need to do the extra work to
|
# we are not using NFS we don't need to do the extra work to
|
||||||
# populate these fields in the environment.
|
# populate these fields in the environment.
|
||||||
def using_nfs?
|
def using_nfs?
|
||||||
@machine.config.vm.synced_folders.any? { |_, opts| opts[:type] == :nfs }
|
!!synced_folders(@machine)[:nfs]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the IP address of the first host only network adapter
|
# Returns the IP address of the first host only network adapter
|
||||||
|
Loading…
Reference in New Issue
Block a user