Skip to content

Commit

Permalink
Arch Linux is not a Red Hat distro
Browse files Browse the repository at this point in the history
Previously, Arch Linux was incorrectly assumed to be part of the RedHat
osfamily. It actually has its own osfamily: Archlinux. However, this was
added in Facter 1.7.0, and previous versions use an osfamily of Linux,
so we just check the value of operatingsystem.
  • Loading branch information
elyscape committed May 6, 2015
1 parent 430cd82 commit 204bfb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
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 204bfb0

Please sign in to comment.