Skip to content

Commit

Permalink
Merge pull request #454 from francis826/redhat_operatingsystemmajrelease
Browse files Browse the repository at this point in the history
Fix to detect the major release version for redhat/centos 7
  • Loading branch information
3flex committed Sep 21, 2014
2 parents d11d574 + 230857f commit f4ef310
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions manifests/package/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
$package_name = 'nginx',
) {

if $::lsbmajdistrelease {
$major_dist_release = $::lsbmajdistrelease
}
else {
$major_dist_release = $::operatingsystemmajrelease
}

case $::operatingsystem {
'fedora': {
# nginx.org does not supply RPMs for fedora
Expand All @@ -31,9 +38,9 @@
}
}
default: {
case $::lsbmajdistrelease {
case $major_dist_release {
5, 6, 7: {
$os_rel = $::lsbmajdistrelease
$os_rel = $major_dist_release
}
default: {
# Amazon uses the year as the $::lsbmajdistrelease
Expand Down

0 comments on commit f4ef310

Please sign in to comment.