mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
Load plugins before finit.conf is parsed, needed by internal inetd services
This patch is slightly sub-optimal, since it will causes us to load all availble plugins, not just those referenced by finit.conf. However, in the short term perspective we need to reference internal inted services provided by plugins from finit.conf, so the dependency order is clear. In the midterm perspective we want to add support for SIGHUP to reload finit.conf, but not plugins. So again, this is an OK patch. One fix would be to allow loading of all plugins, parse finit.conf and then unload all unused plugins before continuing. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
183022ebe4
commit
8c955836dd
3 files changed
+17
-34
No files matched your search
@@ -184,19 +184,17 @@ int main(int argc, char* argv[])
|
||||
*/
|
||||
run_interactive(SETUP_DEVFS, "Populating device tree");
|
||||
|
||||
/*
|
||||
* Load plugins first, finit.conf may contain references to
|
||||
* features implemented by plugins.
|
||||
*/
|
||||
print_result(plugin_load_all(&ctx, PLUGIN_PATH));
|
||||
|
||||
/*
|
||||
* Parse configuration file
|
||||
*/
|
||||
parse_finit_conf(FINIT_CONF);
|
||||
|
||||
/*
|
||||
* Load plugins. Must run after finit.conf has registered
|
||||
* all services, or service plugins won't have anything to
|
||||
* hook on to.
|
||||
*/
|
||||
print_desc("Loading plugins", NULL);
|
||||
print_result(plugin_load_all(&ctx, PLUGIN_PATH));
|
||||
|
||||
/*
|
||||
* Mount filesystems
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user