Skip to content

Commit 5efcdcd

Browse files
MODULES-825: apache 2.4 mod_itk needs mod_prefork
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.
1 parent 004ed86 commit 5efcdcd

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

manifests/mod/itk.pp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
if defined(Class['apache::mod::peruser']) {
1414
fail('May not include both apache::mod::itk and apache::mod::peruser on the same node')
1515
}
16-
if defined(Class['apache::mod::prefork']) {
17-
fail('May not include both apache::mod::itk and apache::mod::prefork on the same node')
16+
if versioncmp($apache_version, '2.4') < 0 {
17+
if defined(Class['apache::mod::prefork']) {
18+
fail('May not include both apache::mod::itk and apache::mod::prefork on the same node')
19+
}
1820
}
1921
if defined(Class['apache::mod::worker']) {
2022
fail('May not include both apache::mod::itk and apache::mod::worker on the same node')

manifests/mod/prefork.pp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
if defined(Class['apache::mod::event']) {
1111
fail('May not include both apache::mod::prefork and apache::mod::event on the same node')
1212
}
13-
if defined(Class['apache::mod::itk']) {
14-
fail('May not include both apache::mod::prefork and apache::mod::itk on the same node')
13+
if versioncmp($apache_version, '2.4') < 0 {
14+
if defined(Class['apache::mod::itk']) {
15+
fail('May not include both apache::mod::prefork and apache::mod::itk on the same node')
16+
}
1517
}
1618
if defined(Class['apache::mod::peruser']) {
1719
fail('May not include both apache::mod::prefork and apache::mod::peruser on the same node')

manifests/mpm.pp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@
4545
before => File[$::apache::mod_enable_dir],
4646
notify => Service['httpd'],
4747
}
48+
49+
if $mpm == 'itk' {
50+
file { "${lib_path}/mod_mpm_itk.so":
51+
ensure => link,
52+
target => "${lib_path}/mpm_itk.so"
53+
}
54+
}
4855
}
4956

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

0 commit comments

Comments
 (0)