Commit 06307f9e authored by Franco Fichtner's avatar Franco Fichtner

config: push plugins.inc to a vital spot to be included once only

parent 0c3caa64
...@@ -55,6 +55,14 @@ require_once("legacy_bindings.inc"); ...@@ -55,6 +55,14 @@ require_once("legacy_bindings.inc");
require_once('upgrade_config.inc'); require_once('upgrade_config.inc');
require_once("certs.inc"); require_once("certs.inc");
/*
* Hook up the plugin system which consists of several low-profile
* functions that can be called from within our backend code when
* they exist. The magic here is that if the plugin system is not
* required it can be completely disabled by removing plugins.inc.
*/
include_once('plugins.inc');
/* make a global alias table (for faster lookups) */ /* make a global alias table (for faster lookups) */
function alias_make_table($config) function alias_make_table($config)
{ {
...@@ -178,7 +186,6 @@ function write_config($desc = '', $backup = true) ...@@ -178,7 +186,6 @@ function write_config($desc = '', $backup = true)
} }
if (function_exists('plugins_interfaces')) { if (function_exists('plugins_interfaces')) {
/* only pull plugins if plugins.inc was included before */
plugins_interfaces(); plugins_interfaces();
} }
......
...@@ -2660,7 +2660,6 @@ function services_get() ...@@ -2660,7 +2660,6 @@ function services_get()
); );
if (function_exists('plugins_services')) { if (function_exists('plugins_services')) {
/* only pull plugins if plugins.inc was included before */
foreach (plugins_services() as $service) { foreach (plugins_services() as $service) {
$services[] = $service; $services[] = $service;
} }
......
...@@ -783,7 +783,6 @@ function system_syslogd_start() ...@@ -783,7 +783,6 @@ function system_syslogd_start()
$syslogconfs = array(); $syslogconfs = array();
if (function_exists('plugins_syslog')) { if (function_exists('plugins_syslog')) {
/* only pull plugins if plugins.inc was included before */
foreach (plugins_syslog() as $plugin_name => $plugin_details) { foreach (plugins_syslog() as $plugin_name => $plugin_details) {
$syslogconfs[$plugin_name] = $plugin_details; $syslogconfs[$plugin_name] = $plugin_details;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment