From 06e48ccd0e5ac97e7c196f005dd56deedea972ed Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 21 Aug 2009 01:20:47 -0400 Subject: [PATCH] Sync run_plugins() with head --- etc/inc/pfsense-utils.inc | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 0bdb23b4ce..40e700be86 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -2230,27 +2230,21 @@ function get_disk_info() { } function run_plugins($directory) { - global $config, $g; - /* process packager manager custom rules */ - $files = return_dir_as_array($directory); - if($files <> "") { - foreach ($files as $file) { - if($file) { - $text = file_get_contents($directory . $file); - if($text) { - if(stristr($file, ".sh") == true) { - mwexec($directory . $file . " start"); - } else { - if(!stristr($file,"CVS")) { - if($g['booting'] == true) - echo "\t{$file}... "; - require_once($directory . "/" . $file); - } - } - } - } - } - } + global $config, $g; + + /* process packager manager custom rules */ + $files = return_dir_as_array($directory); + if (is_array($files)) { + foreach ($files as $file) { + if (stristr($file, ".sh") == true) + mwexec($directory . $file . " start"); + else if (!is_dir($directory . "/" . $file) && stristr($file,".inc")) { + if ($g['booting'] == true) + echo "\t{$file}... "; + require_once($directory . "/" . $file); + } + } + } } /****f* pfsense-utils/display_top_tabs