From 633a56054b345df46a5c9d0a1a054233db54e746 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 10 Sep 2017 13:21:11 +0200 Subject: [PATCH] Add support for boot[S]trap services in /etc/finit.d/*.conf This patch enables support for bootstrap services in /etc/finit.d/ Please note, however, that this does not mean that all configuration directives are now allowed in /etc/finit.d/*.conf -- the intention is only to simplify distribution setups. Signed-off-by: Joachim Nilsson --- src/conf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/conf.c b/src/conf.c index ceae6064..3963be73 100644 --- a/src/conf.c +++ b/src/conf.c @@ -443,7 +443,7 @@ static int parse_conf(char *file) } /* Reload all *.conf in /etc/finit.d/ */ -void conf_reload_dynamic(void) +int conf_reload_dynamic(void) { int i, num; char *dir = rcsd; @@ -456,7 +456,7 @@ void conf_reload_dynamic(void) num = scandir(dir, &e, NULL, alphasort); if (num < 0) { _d("Skipping %s, no files found ...", dir); - return; + return 1; } for (i = 0; i < num; i++) { @@ -514,13 +514,15 @@ void conf_reload_dynamic(void) free(e); set_hostname(&hostname); + + return 0; } int conf_parse_config(void) { hostname = strdup(DEFHOST); - return parse_conf(FINIT_CONF); + return parse_conf(FINIT_CONF) || conf_reload_dynamic(); } /**