summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-04-19 08:30:23 -0300
committerRenato Botelho <renato@netgate.com>2017-04-19 08:32:32 -0300
commit8ad6e37565a2ffc61ba878788f2e5996b0c1d36e (patch)
tree2e2a2ec1e66761173210726f0b55f1556566dc18
parent961e2e6857bbb955f993702d8d93e186a3078c64 (diff)
downloadpfsense-8ad6e37565a2ffc61ba878788f2e5996b0c1d36e.zip
pfsense-8ad6e37565a2ffc61ba878788f2e5996b0c1d36e.tar.gz
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
-rwxr-xr-xsrc/etc/rc.packages10
1 files 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 = '';
OpenPOWER on IntegriCloud