mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
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 <troglobit@gmail.com>
This commit is contained in:
1 parent
3eeb966f15
commit
633a56054b
1 file changed
+5
-3
+5
-3
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user