From 72526d9e88378f8a8573c44940e3d28c75a24a56 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 26 Feb 2018 22:13:00 +0100 Subject: [PATCH] Revert #52: don't reload .conf files after run-parts and rc.local Issue #52 suggested calling service_reload_dynamic() automatically after run-parts and /etc/rc.local. This may seem like a good idea, but not only does it create extra overhead, it currently also freezes the boot and fails to present a login prompt if a run-parts directory exists. Yes, the directory can be empty, it just have to exist to trigger this regression. While trying to find the root cause I realized this was all just wrong. If the user does something that requires reloading finit, they should call `initctl reload` from the script instead. Signed-off-by: Joachim Nilsson --- src/finit.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/finit.c b/src/finit.c index f82ad2f8..d45a2dc7 100644 --- a/src/finit.c +++ b/src/finit.c @@ -217,12 +217,8 @@ static void finalize(void) /* * Run startup scripts in the runparts directory, if any. */ - if (runparts && fisdir(runparts) && !rescue) { - _d("Running startup scripts in %s ...", runparts); + if (runparts && fisdir(runparts) && !rescue) run_parts(runparts, NULL); - if (conf_any_change()) - service_reload_dynamic(); - } /* * Start all tasks/services in the configured runlevel @@ -240,11 +236,8 @@ static void finalize(void) service_step_all(SVC_TYPE_ANY); /* Convenient SysV compat for when you just don't care ... */ - if (!access(FINIT_RC_LOCAL, X_OK) && !rescue) { + if (!access(FINIT_RC_LOCAL, X_OK) && !rescue) run_interactive(FINIT_RC_LOCAL, "Calling %s", FINIT_RC_LOCAL); - if (conf_any_change()) - service_reload_dynamic(); - } /* Hooks that should run at the very end */ _d("Calling all system up hooks ...");