diff --git a/lib/puppet/provider/network_config/interfaces.rb b/lib/puppet/provider/network_config/interfaces.rb index f989d08b..54163741 100644 --- a/lib/puppet/provider/network_config/interfaces.rb +++ b/lib/puppet/provider/network_config/interfaces.rb @@ -1,4 +1,9 @@ -require 'puppetx/filemapper' +begin + require 'puppetx/filemapper' +rescue LoadError + mod = Puppet::Module.find('filemapper', Puppet[:environment].to_s) + require File.join mod.path, 'lib/puppetx/filemapper' +end Puppet::Type.type(:network_config).provide(:interfaces) do # Debian network_config interfaces provider. diff --git a/lib/puppet/provider/network_config/redhat.rb b/lib/puppet/provider/network_config/redhat.rb index 67cee1ad..937e0a0b 100644 --- a/lib/puppet/provider/network_config/redhat.rb +++ b/lib/puppet/provider/network_config/redhat.rb @@ -1,4 +1,9 @@ -require 'puppetx/filemapper' +begin + require 'puppetx/filemapper' +rescue LoadError + mod = Puppet::Module.find('filemapper', Puppet[:environment].to_s) + require File.join mod.path, 'lib/puppetx/filemapper' +end Puppet::Type.type(:network_config).provide(:redhat) do # Red Hat network_config network scripts provider. diff --git a/lib/puppet/type/network_config.rb b/lib/puppet/type/network_config.rb index 75404d72..755930de 100644 --- a/lib/puppet/type/network_config.rb +++ b/lib/puppet/type/network_config.rb @@ -1,4 +1,9 @@ -require 'puppet/property/boolean' +begin + require 'puppet/property/boolean' +rescue LoadError + vmware_module = Puppet::Module.find('boolean', Puppet[:environment].to_s) + require File.join vmware_module.path, 'lib/puppet/property/boolean' +end Puppet::Type.newtype(:network_config) do @doc = "Manage non-volatile network configuration information"