Skip to content

Instantly share code, notes, and snippets.

@dcarley
Created October 26, 2011 08:13
Show Gist options
  • Save dcarley/1315760 to your computer and use it in GitHub Desktop.
Save dcarley/1315760 to your computer and use it in GitHub Desktop.
Hack for puppetlabs-firewall util loading related to bug #4248
diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb
index d4c7faa..0e8ec79 100644
--- a/lib/puppet/provider/firewall/iptables.rb
+++ b/lib/puppet/provider/firewall/iptables.rb
@@ -1,4 +1,4 @@
-require 'puppet/provider/firewall'
+require File.expand_path('../firewall', File.dirname(__FILE__))
require 'digest/md5'
Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Firewall do
diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb
index 2eb8751..b07f208 100644
--- a/lib/puppet/type/firewall.rb
+++ b/lib/puppet/type/firewall.rb
@@ -1,5 +1,5 @@
# Puppet Firewall type
-require 'puppet/util/firewall'
+require File.expand_path('../util/firewall', File.dirname(__FILE__))
Puppet::Type.newtype(:firewall) do
include Puppet::Util::Firewall
diff --git a/lib/puppet/util/firewall.rb b/lib/puppet/util/firewall.rb
index d49aeb4..e05a84b 100644
--- a/lib/puppet/util/firewall.rb
+++ b/lib/puppet/util/firewall.rb
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
require 'socket'
-require 'puppet/util/ipcidr'
+require File.expand_path('ipcidr', File.dirname(__FILE__))
module Puppet::Util::Firewall
# Translate the symbolic names for icmp packet types to integers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment