From 5b12d17b561648a95683e42ee00861e03327a811 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 8 Dec 2016 01:43:32 +0100 Subject: [PATCH] Fix #52: Add implicit "initctl reload" adter run-parts and rc.local This patch (untested) patch calls `service_reload_dynamic()` after both run-parts (if directory exists) and after `/etc/rc.local` has run. The intention is to reload any services modified/added/removed by a user script so the system is properly up to date. Signed-off-by: Joachim Nilsson --- finit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/finit.c b/finit.c index 8942b2df..92b1b9c0 100644 --- a/finit.c +++ b/finit.c @@ -415,11 +415,14 @@ int main(int argc, char* argv[]) if (runparts && fisdir(runparts)) { _d("Running startup scripts in %s ...", runparts); run_parts(runparts, NULL); + service_reload_dynamic(); } /* Convenient SysV compat for when you just don't care ... */ - if (!access(FINIT_RC_LOCAL, X_OK)) + if (!access(FINIT_RC_LOCAL, X_OK)) { run_interactive(FINIT_RC_LOCAL, "Calling %s", FINIT_RC_LOCAL); + service_reload_dynamic(); + } /* Hooks that should run at the very end */ plugin_run_hooks(HOOK_SYSTEM_UP);