Load plugins much earlier, for future banner plugin

This patch moves the plugin loader much earlier, making it possible to
provide a custom banner/logo in a plugin.

To facilitate this move we need to also move banner later and parsing
of the kernel cmdline earlier, right after mouting /proc.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-07-08 00:05:07 +02:00
parent 709e4230c8
commit 878885e2b2
2 changed files with 21 additions and 19 deletions
+1 -3
View File
@@ -322,8 +322,6 @@ static int load_plugins(char *path)
DIR *dp;
struct dirent *entry;
print_desc("Loading plugins", NULL);
dp = opendir(path);
if (!dp) {
_e("Failed, cannot open plugin directory %s: %s", path, strerror(errno));
@@ -358,7 +356,7 @@ int plugin_init(uev_ctx_t *ctx, char *path)
if (!load_plugins(path))
fail = init_plugins(ctx);
return print_result(fail);
return fail;
}
void plugin_exit(void)