Comparison

core/modulemanager.lua @ 1094:a619525fed5d

modulemanager: Don't load modules when modules_enable is false
author Matthew Wild <mwild1@gmail.com>
date Sat, 02 May 2009 22:01:22 +0100
parent 1069:034e345c0f8d
child 1105:965a55db3732
comparison
equal deleted inserted replaced
1093:5b7b2d2e9a33 1094:a619525fed5d
51 51
52 local NULL = {}; 52 local NULL = {};
53 53
54 -- Load modules when a host is activated 54 -- Load modules when a host is activated
55 function load_modules_for_host(host) 55 function load_modules_for_host(host)
56 if config.get(host, "core", "modules_enable") == false then
57 return; -- Only load for hosts, not components, etc.
58 end
59
56 -- Load modules from global section 60 -- Load modules from global section
57 local modules_enabled = config.get("*", "core", "modules_enabled"); 61 local modules_enabled = config.get("*", "core", "modules_enabled");
58 local modules_disabled = config.get(host, "core", "modules_disabled"); 62 local modules_disabled = config.get(host, "core", "modules_disabled");
59 local disabled_set = {}; 63 local disabled_set = {};
60 if modules_enabled then 64 if modules_enabled then