aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-12-20 14:06:16 +0000
committerMatthew Wild <mwild1@gmail.com>2010-12-20 14:06:16 +0000
commit44bf454dd5af3036b29302b73622a9a1e5e0db12 (patch)
treebcb6459ad810cfb0f97a105641a28e70c6498e2c /prosody
parent7cc4ae96d4315892682a5dc35083ef463aa6f71e (diff)
downloadprosody-44bf454dd5af3036b29302b73622a9a1e5e0db12.tar.gz
prosody-44bf454dd5af3036b29302b73622a9a1e5e0db12.zip
prosody, prosodyctl, util.dependencies: Split checking and logging of dependencies so we can check hard deps before the config and logging is loaded
Diffstat (limited to 'prosody')
-rwxr-xr-xprosody15
1 files changed, 9 insertions, 6 deletions
diff --git a/prosody b/prosody
index 061f3781..d4bf7578 100755
--- a/prosody
+++ b/prosody
@@ -35,6 +35,12 @@ end
prosody = { events = require "util.events".new(); };
local prosody = prosody;
+-- Check dependencies
+local dependencies = require "util.dependencies";
+if not dependencies.check_dependencies() then
+ os.exit(1);
+end
+
-- Load the config-parsing module
config = require "core.configmanager"
@@ -99,11 +105,8 @@ function init_logging()
require "core.loggingmanager"
end
-function check_dependencies()
- -- Check runtime dependencies
- if not require "util.dependencies".check_dependencies() then
- os.exit(1);
- end
+function log_dependency_warnings()
+ dependencies.log_warnings();
end
function sandbox_require()
@@ -442,13 +445,13 @@ end
-- previous steps to have already been performed
read_config();
init_logging();
-check_dependencies();
sandbox_require();
set_function_metatable();
load_libraries();
init_global_state();
read_version();
log("info", "Hello and welcome to Prosody version %s", prosody.version);
+log_dependency_warnings();
load_secondary_libraries();
init_data_store();
init_global_protection();