Skip to content

Commit

Permalink
Fix loading issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
nanliu committed May 29, 2013
1 parent 206c2d7 commit 59e8773
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion lib/puppet/provider/network_config/interfaces.rb
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 6 additions & 1 deletion lib/puppet/provider/network_config/redhat.rb
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 6 additions & 1 deletion lib/puppet/type/network_config.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 59e8773

Please sign in to comment.