Skip to content

Commit

Permalink
Merge pull request #526 from elyscape/arch_linux
Browse files Browse the repository at this point in the history
Fix Arch Linux support
  • Loading branch information
jonnytdevops committed May 7, 2015
2 parents d6a9344 + 213a5a2 commit db063e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion manifests/linux/gentoo.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# = Class: firewall::linux::gentoo
#
# Manages `iptables` and `ip6tables` services, and creates files used for
# persistence, on Arch Linux systems.
# persistence, on Gentoo Linux systems.
#
# == Parameters:
#
Expand Down
16 changes: 10 additions & 6 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
$service_name = 'iptables'
$package_name = undef
}
'Archlinux': {
$service_name = ['iptables','ip6tables']
$package_name = undef
}
'Fedora': {
if versioncmp($::operatingsystemrelease, '15') >= 0 {
$package_name = 'iptables-services'
Expand Down Expand Up @@ -61,8 +57,16 @@
$package_name = 'net-firewall/iptables'
}
default: {
$package_name = undef
$service_name = 'iptables'
case $::operatingsystem {
'Archlinux': {
$service_name = ['iptables','ip6tables']
$package_name = undef
}
default: {
$service_name = 'iptables'
$package_name = undef
}
}
}
}
}
2 changes: 1 addition & 1 deletion spec/unit/classes/firewall_linux_archlinux_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
describe 'firewall::linux::archlinux', :type => :class do
let(:facts) do
{
:osfamily => 'RedHat',
:osfamily => 'Archlinux',
:operatingsystem => 'Archlinux'
}
end
Expand Down

0 comments on commit db063e5

Please sign in to comment.