Skip to content

Commit

Permalink
MODULES-825: apache 2.4 mod_itk needs mod_prefork
Browse files Browse the repository at this point in the history
in apache 2.4 mod_prefork can be installed along with mod_itk

On ubuntu 14.04 mod_itk library name is "mpm_itk.so" instead of "mod_mpm_itk.so".
Added an if statement that creates a symlink in case of a debian distro. this preserve old manifest behaviour in library loading while fixing ubuntu bug.
  • Loading branch information
valeriominetti committed Nov 27, 2014
1 parent 004ed86 commit 5efcdcd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 4 additions & 2 deletions manifests/mod/itk.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
if defined(Class['apache::mod::peruser']) {
fail('May not include both apache::mod::itk and apache::mod::peruser on the same node')
}
if defined(Class['apache::mod::prefork']) {
fail('May not include both apache::mod::itk and apache::mod::prefork on the same node')
if versioncmp($apache_version, '2.4') < 0 {
if defined(Class['apache::mod::prefork']) {
fail('May not include both apache::mod::itk and apache::mod::prefork on the same node')
}
}
if defined(Class['apache::mod::worker']) {
fail('May not include both apache::mod::itk and apache::mod::worker on the same node')
Expand Down
6 changes: 4 additions & 2 deletions manifests/mod/prefork.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
if defined(Class['apache::mod::event']) {
fail('May not include both apache::mod::prefork and apache::mod::event on the same node')
}
if defined(Class['apache::mod::itk']) {
fail('May not include both apache::mod::prefork and apache::mod::itk on the same node')
if versioncmp($apache_version, '2.4') < 0 {
if defined(Class['apache::mod::itk']) {
fail('May not include both apache::mod::prefork and apache::mod::itk on the same node')
}
}
if defined(Class['apache::mod::peruser']) {
fail('May not include both apache::mod::prefork and apache::mod::peruser on the same node')
Expand Down
7 changes: 7 additions & 0 deletions manifests/mpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
before => File[$::apache::mod_enable_dir],
notify => Service['httpd'],
}

if $mpm == 'itk' {
file { "${lib_path}/mod_mpm_itk.so":
ensure => link,
target => "${lib_path}/mpm_itk.so"
}
}
}

if versioncmp($apache_version, '2.4') < 0 {
Expand Down

0 comments on commit 5efcdcd

Please sign in to comment.