diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2016-01-08 14:23:41 -0500 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2016-01-08 14:23:41 -0500 |
commit | 2f1ec08068f8c91a0fd9b70a1426cd78bbcad6ac (patch) | |
tree | 38c002a9afd0a24700c2d4754b0d0f3b63efe255 | |
parent | Add sapi_link_name_target() to clean up set_sapi(). (diff) | |
download | eselect-php-2f1ec08068f8c91a0fd9b70a1426cd78bbcad6ac.tar.gz eselect-php-2f1ec08068f8c91a0fd9b70a1426cd78bbcad6ac.tar.bz2 eselect-php-2f1ec08068f8c91a0fd9b70a1426cd78bbcad6ac.zip |
Add config warning when setting the apache2 target.
-rw-r--r-- | src/php.eselect.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/php.eselect.in b/src/php.eselect.in index 7acda64..b47d218 100644 --- a/src/php.eselect.in +++ b/src/php.eselect.in @@ -463,7 +463,27 @@ set_sapi() { } +# Check to see if the user is still using the old-style apache +# configuration with -DPHP5 and 70_mod_php5.conf. If he is, warn him +# that it is outdated, and that his eselect choices will not have any +# effect until the configuration is updated. +apache2_php5_config_check() { + if [ -f "${EROOT}/etc/apache2/modules.d/70_mod_php5.conf" ] ; then + local msg + write_warning_msg "The apache2 configuration has changed in this" + write_warning_msg "version of eselect-php. You should define \"-D PHP\"" + write_warning_msg "and not \"-D PHP5\" for apache. The module is now" + write_warning_msg "loaded by 70_mod_php.conf (was 70_mod_php5.conf)." + write_warning_msg "After you have changed \"-D PHP5\" to \"-D PHP\", " + write_warning_msg "you should remove 70_mod_php5.conf to eliminate" + write_warning_msg "this warning. Until you have done so, your eselect" + write_warning_msg "choices for apache2 will have no effect." + echo + fi +} + set_apache2() { + apache2_php5_config_check local target="${1}" set_sapi apache2 "${target}" write_mod_php_conf "$(resolv_target apache2 "${target}")" |