Start runparts with -d in debug mode, otherwise -p for progress

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-09-10 13:16:09 +02:00
1 parent f2507d9fd7
commit 3e269c632f
1 file changed
+3 -2
+3 -2
View File
@@ -1453,10 +1453,11 @@ int conf_init(uev_ctx_t *ctx)
*/
if (runparts && fisdir(runparts) && !rescue) {
char conf[sizeof(_PATH_RUNPARTS) + strlen(runparts) + 100];
char *args = debug ? "-d" : "-p";
snprintf(conf, sizeof(conf), "[S] <int/bootstrap> %s %s"
snprintf(conf, sizeof(conf), "[S] <int/bootstrap> log:console %s %s %s"
" -- Calling runparts %s in the background",
_PATH_RUNPARTS, runparts, runparts);
_PATH_RUNPARTS, args, runparts, runparts);
service_register(SVC_TYPE_TASK, conf, global_rlimit, NULL);
}