From bdceeb83d5a22f115c753ce81b58b27787b5cc1e Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 20 Oct 2020 09:47:37 +0200 Subject: [PATCH] Ensure that plugins are loaded before the first hook point We want plugins to be able to register themselves at the banner hook point, but that requires that we have actually loaded them before then. --- src/finit.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/finit.c b/src/finit.c index 46492e4e..13c04cda 100644 --- a/src/finit.c +++ b/src/finit.c @@ -378,6 +378,10 @@ int main(int argc, char *argv[]) */ emergency_shell(); + /* Load plugins early, the first hook is in banner(), so we + * need plugins loaded before calling it. */ + plugin_init(&loop); + /* * Hello world. */ @@ -388,12 +392,6 @@ int main(int argc, char *argv[]) */ sig_init(); - /* - * Load plugins early, finit.conf may contain references to - * features implemented by plugins. - */ - plugin_init(&loop); - /* * Initialize default control groups, if available */