From 2e31042e43f9d7df266402dca72a9424b33f7c5b Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 12 Aug 2016 07:49:12 +0200 Subject: [PATCH] rc: transition code for new-style extensions ordering --- src/etc/rc.php_ini_setup | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/etc/rc.php_ini_setup b/src/etc/rc.php_ini_setup index 1d095c98d..179494849 100755 --- a/src/etc/rc.php_ini_setup +++ b/src/etc/rc.php_ini_setup @@ -76,11 +76,12 @@ touch ${EXTENSIONS_INI} cp ${EXTENSIONS_INI} ${_EXTENSIONS_INI} chmod 644 ${_EXTENSIONS_INI} -# Clear the .ini file to make sure we are clean +# Clear the .ini files in preparation for the rewrite +rm -f /usr/local/etc/php/extensions.ini rm -f /usr/local/etc/php.ini rm -f /usr/local/lib/php.ini -# Fetch the timezone from the XML and set it here. We set it later too in the running scripts +# Fetch the timezone from the XML and set it here TIMEZONE=Etc/UTC if [ -f /conf/config.xml ]; then TIMEZONE=`cat /conf/config.xml | egrep -E '(.*?)' | awk -F'>' '{print $2}'|awk -F'<' '{print $1}'` @@ -160,4 +161,7 @@ EOF # Copy php.ini file to etc/ too (cli) cp /usr/local/lib/php.ini /usr/local/etc/php.ini -mv ${_EXTENSIONS_INI} ${EXTENSIONS_INI} +if [ ! -f /usr/local/etc/php/ext-20-gettext.ini ]; then + # Only needs a copy for FreeBSD's old style PHP module register + mv ${_EXTENSIONS_INI} ${EXTENSIONS_INI} +fi