Skip to content

Commit

Permalink
Fix the RedHat bits to better match the Fedora PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
razorsedge committed Sep 2, 2014
1 parent bbcae38 commit 293a6b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@
}
'RedHat': {
$config_file = $::operatingsystem ? {
'Fedora' => $::operatingsystemrelease ? {
'Fedora' => $::operatingsystemrelease ? {
# No, I am not going to support versions 1-9.
/10|11|12|13|14|15|16|17|18/ => '/etc/smartd.conf',
default => '/etc/smartmontools/smartd.conf',
},
default => $::operatingsystemmajrelease ? {
'7' => '/etc/smartmontools/smartd.conf',
default => '/etc/smartd.conf',
/RedHat|CentOS|Scientific|SLC|OracleLinux|OEL/ => $::operatingsystemmajrelease ? {
/4|5|6/ => '/etc/smartd.conf',
default => '/etc/smartmontools/smartd.conf',
},
default => '/etc/smartd.conf',
}
$service_name = 'smartd'
}
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/smartd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
end

describe 'for operatingsystemmajrelease 7' do
let(:facts) {{ :osfamily => 'RedHat', :operatingsystem => 'RedHat', :operatingsystemmajrelease => '7', :smartmontools_version => '5.43' }}
let(:facts) {{ :osfamily => 'RedHat', :operatingsystem => 'RedHat', :operatingsystemmajrelease => '7', :smartmontools_version => '6.2' }}

it_behaves_like 'default', { :config_file => '/etc/smartmontools/smartd.conf' }
it { should_not contain_shell_config('start_smartd') }
Expand Down

0 comments on commit 293a6b2

Please sign in to comment.