Permalink
Browse files

Fix for OS detection case sensitivity - basically I downcase the fact…

…er return and only look for lowercase responses.
  • Loading branch information...
1 parent f67bf25 commit fd96d5933400a4105d041b7776657ff1c88ae150 Ken Barber committed Jun 4, 2010
Showing with 6 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +2 −0 Modulefile
  3. +3 −3 lib/puppet/type/iptables.rb
View
@@ -0,0 +1 @@
+pkg/
View
@@ -0,0 +1,2 @@
+name 'kbarber-iptables'
+version '1.0.1'
@@ -440,9 +440,9 @@ def finalize
}
# Run iptables save to persist rules. The behaviour is to do nothing
# if we no nothing of the operating system.
- persist_cmd = case Facter.value(:operatingsystem)
- when /(Fedora|Redhat|Centos)/ then "/sbin/service iptables save"
- when /(Ubuntu|Debian)/ then "/sbin/iptables-save > /etc/iptables.rules"
+ persist_cmd = case Facter.value(:operatingsystem).downcase
+ when /(fedora|redhat|centos)/ then "/sbin/service iptables save"
+ when /(ubuntu|debian)/ then "/sbin/iptables-save > /etc/iptables.rules"
else nil
end
debug("Saving iptables with: #{persist_cmd}")

0 comments on commit fd96d59

Please sign in to comment.