diff --git a/conf.c b/conf.c index 8c3f3df8..48a95e2b 100644 --- a/conf.c +++ b/conf.c @@ -122,6 +122,11 @@ void parse_finit_conf(char *file) network = build_cmd(NULL, x, CMD_SIZE); continue; } + if (MATCH_CMD(line, "runparts ", x)) { + if (rcsd) free(rcsd); + hostname = build_cmd(NULL, x, CMD_SIZE); + continue; + } if (MATCH_CMD(line, "startx ", x)) { svc_register(x, username); continue; diff --git a/finit.c b/finit.c index 28ca7a7a..23a60e36 100644 --- a/finit.c +++ b/finit.c @@ -33,6 +33,7 @@ #include "plugin.h" #include "svc.h" #include "sig.h" +#include "lite.h" int debug = 0; int verbose = 1; @@ -40,6 +41,7 @@ char *sdown = NULL; char *network = NULL; char *username = NULL; char *hostname = NULL; +char *rcsd = FINIT_RCSD; static void parse_kernel_cmdline(void) @@ -181,8 +183,10 @@ int main(int UNUSED(args), char *argv[]) /* * Run startup scripts in /etc/finit.d/, if any. */ - _d("Running startup scripts in /etc/finit.d/ ..."); - run_parts(FINIT_RCSD); + if (rcsd && fisdir(rcsd)) { + _d("Running startup scripts in %s ...", rcsd); + run_parts(rcsd); + } /* * Hooks that should run at the very end diff --git a/finit.h b/finit.h index f530b598..a1cf6416 100644 --- a/finit.h +++ b/finit.h @@ -66,6 +66,7 @@ extern char *sdown; extern char *network; extern char *hostname; extern char *username; +extern char *rcsd; /* conf.c */ void parse_finit_conf(char *file);