| 1 | # Copyright 2004 Gentoo Foundation |
1 | # Copyright 2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License, v2 or later |
2 | # Distributed under the terms of the GNU General Public License, v2 or later |
| 3 | # Author Michael Tindal <urilith@gentoo.org> |
3 | # Author Michael Tindal <urilith@gentoo.org> |
| 4 | # $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.8 2005/06/04 17:59:27 urilith Exp $ |
4 | # $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.9 2005/06/04 18:13:05 vericgar Exp $ |
| 5 | ECLASS=apache-module |
5 | ECLASS=apache-module |
| 6 | INHERITED="$INHERITED $ECLASS" |
6 | INHERITED="$INHERITED $ECLASS" |
| 7 | |
7 | |
| 8 | inherit depend.apache |
8 | inherit depend.apache |
| 9 | |
9 | |
| … | |
… | |
| 233 | apache2_pkg_setup() { |
233 | apache2_pkg_setup() { |
| 234 | debug-print-function apache2_pkg_setup |
234 | debug-print-function apache2_pkg_setup |
| 235 | |
235 | |
| 236 | if [ -n "${APACHE2_SAFE_MPMS}" ]; then |
236 | if [ -n "${APACHE2_SAFE_MPMS}" ]; then |
| 237 | |
237 | |
| 238 | INSTALLED_MPM="$(apxs2 -q MPM_NAME)" |
238 | INSTALLED_MPM="$(${ROOT}/usr/sbin/apxs2 -q MPM_NAME)" |
| 239 | |
239 | |
| 240 | if ! hasq ${INSTALLED_MPM} ${APACHE2_SAFE_MPMS} ; then |
240 | if hasq ${INSTALLED_MPM} ${APACHE2_SAFE_MPMS} ; then |
| 241 | INSTALLED_MPM_UNSAFE="yes" |
241 | INSTALLED_MPM_SAFE="yes" |
| 242 | else |
242 | fi |
| 243 | INSTALLED_MPM_SAFE="yes" |
|
|
| 244 | fi |
|
|
| 245 | |
243 | |
| 246 | if [ -z "${INSTALLED_MPM_SAFE}" ] ; then |
244 | if [ -z "${INSTALLED_MPM_SAFE}" ] ; then |
| 247 | eerror "The module you are trying to install (${PN})" |
245 | eerror "The module you are trying to install (${PN})" |
| 248 | eerror "will only work with one of the following MPMs:" |
246 | eerror "will only work with one of the following MPMs:" |
| 249 | eerror " ${APACHE2_SAFE_MPMS}" |
247 | eerror " ${APACHE2_SAFE_MPMS}" |
| … | |
… | |
| 332 | einfo |
330 | einfo |
| 333 | fi |
331 | fi |
| 334 | |
332 | |
| 335 | if [ -n "${APACHE2_SAFE_MPMS}" ]; then |
333 | if [ -n "${APACHE2_SAFE_MPMS}" ]; then |
| 336 | |
334 | |
| 337 | INSTALLED_MPM="$(apxs2 -q MPM_NAME)" |
335 | INSTALLED_MPM="$(${ROOT}/usr/sbin/apxs2 -q MPM_NAME)" |
| 338 | |
336 | |
| 339 | if ! hasq ${INSTALLED_MPM} ${APACHE2_SAFE_MPMS} ; then |
337 | if ! hasq ${INSTALLED_MPM} ${APACHE2_SAFE_MPMS} ; then |
| 340 | INSTALLED_MPM_UNSAFE="${INSTALLED_MPM_UNSAFE} ${mpm}" |
338 | INSTALLED_MPM_UNSAFE="${INSTALLED_MPM_UNSAFE} ${mpm}" |
| 341 | else |
339 | else |
| 342 | INSTALLED_MPM_SAFE="${INSTALLED_MPM_SAFE} ${mpm}" |
340 | INSTALLED_MPM_SAFE="${INSTALLED_MPM_SAFE} ${mpm}" |