diff options
author | Renato Botelho <renato@netgate.com> | 2015-10-13 07:43:12 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-10-13 07:43:12 -0300 |
commit | 3646fbcb70e0f7e328e7657115ebba3dcb505ff7 (patch) | |
tree | a0f7565b73d6d9422423eb84144cc950bbcd776b | |
parent | 96d5ca1169c2435572065c103639988b7ef7c9d3 (diff) | |
download | pfsense-3646fbcb70e0f7e328e7657115ebba3dcb505ff7.zip pfsense-3646fbcb70e0f7e328e7657115ebba3dcb505ff7.tar.gz |
Remove /usr/local/lib/php.ini, we don't need 2 copies of this
-rw-r--r-- | src/etc/pfSense.obsoletedfiles | 1 | ||||
-rwxr-xr-x | src/etc/rc | 4 | ||||
-rwxr-xr-x | src/etc/rc.php-fpm_restart | 4 | ||||
-rwxr-xr-x | src/etc/rc.php_ini_setup | 30 |
4 files changed, 14 insertions, 25 deletions
diff --git a/src/etc/pfSense.obsoletedfiles b/src/etc/pfSense.obsoletedfiles index 647866f..f8e2b7b 100644 --- a/src/etc/pfSense.obsoletedfiles +++ b/src/etc/pfSense.obsoletedfiles @@ -580,6 +580,7 @@ /usr/local/lib/olsrd_power.so.0.3 /usr/local/lib/olsrd_secure.so.0.5 /usr/local/lib/olsrd_txtinfo.so.0.1 +/usr/local/lib/php.ini /usr/local/lib/php/20060613 /usr/local/lib/php/20090626 /usr/local/lib/php/20121212 @@ -345,9 +345,9 @@ echo "done." /usr/local/sbin/${product}-upgrade -y -b 2 # Run the php.ini setup file and populate -# /usr/local/etc/php.ini and /usr/local/lib/php.ini +# /usr/local/etc/php.ini /etc/rc.php_ini_setup 2>/tmp/php_errors.txt -/usr/local/sbin/php-fpm -c /usr/local/lib/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null +/usr/local/sbin/php-fpm -c /usr/local/etc/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null # Launch external configuration loader for supported platforms if [ "$PLATFORM" = "nanobsd" ]; then diff --git a/src/etc/rc.php-fpm_restart b/src/etc/rc.php-fpm_restart index 6ce04c6..a9a9ee1 100755 --- a/src/etc/rc.php-fpm_restart +++ b/src/etc/rc.php-fpm_restart @@ -5,7 +5,7 @@ echo ">>> Killing php-fpm" sleep 2 # Run the php.ini setup file and populate -# /usr/local/etc/php.ini and /usr/local/lib/php.ini +# /usr/local/etc/php.ini /etc/rc.conf_mount_rw /etc/rc.php_ini_setup 2>/tmp/php_errors.txt /bin/rm -f /var/run/php-fpm.pid 2>/dev/null @@ -13,5 +13,5 @@ sleep 2 /etc/rc.conf_mount_ro echo ">>> Restarting php-fpm" | /usr/bin/logger -p daemon.info -i -t rc.php-fpm_restart echo ">>> Starting php-fpm" -/usr/local/sbin/php-fpm -c /usr/local/lib/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null +/usr/local/sbin/php-fpm -c /usr/local/etc/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null diff --git a/src/etc/rc.php_ini_setup b/src/etc/rc.php_ini_setup index b4038e7..de2d34e 100755 --- a/src/etc/rc.php_ini_setup +++ b/src/etc/rc.php_ini_setup @@ -151,9 +151,6 @@ PHP_ZEND_MODULES="" if [ -f /usr/local/etc/php.ini ]; then /bin/rm /usr/local/etc/php.ini fi -if [ -f /usr/local/lib/php.ini ]; then - /bin/rm /usr/local/lib/php.ini -fi LOADED_MODULES=`/usr/local/bin/php-cgi -m | /usr/bin/grep -v "\["` unset TIMEZONE @@ -176,7 +173,7 @@ fi # Populate a dummy php.ini to avoid # the file being clobbered and the firewall # not being able to boot back up. -/bin/cat >/usr/local/lib/php.ini <<EOF +/bin/cat >/usr/local/etc/php.ini <<EOF ; File generated from /etc/rc.php_ini_setup output_buffering = "0" expose_php = Off @@ -206,9 +203,6 @@ date.timezone="${TIMEZONE}" EOF -# Copy php.ini file to etc/ too (cli) -/bin/cp /usr/local/lib/php.ini /usr/local/etc/php.ini - # Loop through and generate modules to load. # Take into account modules built into php. for EXT in $PHPMODULES; do @@ -222,7 +216,7 @@ for EXT in $PHPMODULES; do if [ "$SHOULDADD" = "true" ]; then # Ensure extension exists before adding. if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then - echo "extension=${EXT}.so" >> /usr/local/lib/php.ini + echo "extension=${EXT}.so" >> /usr/local/etc/php.ini fi fi done @@ -231,13 +225,13 @@ done for EXT in $PHP_ZEND_MODULES; do # Ensure extension exists before adding. if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then - echo "zend_extension=${EXT}.so" >> /usr/local/lib/php.ini + echo "zend_extension=${EXT}.so" >> /usr/local/etc/php.ini fi done if [ "$LOWMEM" != "TRUE" ]; then - /bin/cat >>/usr/local/lib/php.ini <<EOF + /bin/cat >>/usr/local/etc/php.ini <<EOF ; opcache Settings opcache.enabled="1" @@ -246,13 +240,13 @@ opcache.memory_consumption="${OPCACHEMEMSIZE}" EOF else - /bin/cat >>/usr/local/lib/php.ini <<EOF + /bin/cat >>/usr/local/etc/php.ini <<EOF ; opcache Settings opcache.enabled="0" EOF fi - /bin/cat >>/usr/local/lib/php.ini <<EOF + /bin/cat >>/usr/local/etc/php.ini <<EOF [suhosin] suhosin.get.max_array_depth = 5000 @@ -343,9 +337,6 @@ EOF fi -# Copy php.ini file to etc/ too (cli) -/bin/cp /usr/local/lib/php.ini /usr/local/etc/php.ini - # Remove old log file if it exists. if [ -f /var/run/php_modules_load_errors.txt ]; then /bin/rm /var/run/php_modules_load_errors.txt @@ -376,12 +367,9 @@ for EXT in $PHPMODULESLC; do if [ "$SHOULDREMOVE" = "true" ]; then if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then echo ">>> ${EXT} did not load correctly. Removing from php.ini..." >> /var/run/php_modules_load_errors.txt - /bin/cat /usr/local/lib/php.ini | /usr/bin/grep -v $EXT > /tmp/php.ini - /bin/rm -f /usr/local/lib/php.ini - /bin/mv /tmp/php.ini /usr/local/lib/php.ini + /bin/cat /usr/local/etc/php.ini | /usr/bin/grep -v $EXT > /tmp/php.ini + /bin/rm -f /usr/local/etc/php.ini + /bin/mv /tmp/php.ini /usr/local/etc/php.ini fi fi done - -# Copy php.ini file to etc/ too (cli) -/bin/cp /usr/local/lib/php.ini /usr/local/etc/php.ini |