From 8ad6e37565a2ffc61ba878788f2e5996b0c1d36e Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 19 Apr 2017 08:30:23 -0300 Subject: Fix installation of extra packages at build time relaxing check for running PHP instance and moving it to the top before any require_once() attempt runs --- src/etc/rc.packages | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/etc/rc.packages b/src/etc/rc.packages index d503b6b..a957b81 100755 --- a/src/etc/rc.packages +++ b/src/etc/rc.packages @@ -52,6 +52,11 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* If PHP is not running, silently abort and run registration during boot */ +if (!file_exists('/var/run/php-fpm.pid')) { + exit; +} + require_once("config.inc"); require_once("functions.inc"); require_once("filter.inc"); @@ -73,11 +78,6 @@ if ($argc == 1) { exit; } -/* If PHP is not running, silently abort and run registration during boot */ -if (!isvalidpid('/var/run/php-fpm.pid')) { - exit; -} - $pkg = ''; $when = ''; -- cgit v1.1