summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-08-21 01:20:47 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-08-21 01:20:47 -0400
commit06e48ccd0e5ac97e7c196f005dd56deedea972ed (patch)
tree898c0b1e4c4f117e7fb162380daaa609984282c4
parent3b65922290cb8775d111d8b4611717904024e8ad (diff)
downloadpfsense-06e48ccd0e5ac97e7c196f005dd56deedea972ed.zip
pfsense-06e48ccd0e5ac97e7c196f005dd56deedea972ed.tar.gz
Sync run_plugins() with head
-rw-r--r--etc/inc/pfsense-utils.inc36
1 files changed, 15 insertions, 21 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 0bdb23b..40e700b 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
OpenPOWER on IntegriCloud