From 3e269c632f6a4b2d2ab6f7d422218a83d57e10c9 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 10 Sep 2023 10:12:02 +0200 Subject: [PATCH] Start runparts with -d in debug mode, otherwise -p for progress Signed-off-by: Joachim Wiberg --- src/conf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conf.c b/src/conf.c index e2769843..01ce9718 100644 --- a/src/conf.c +++ b/src/conf.c @@ -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] %s %s" + snprintf(conf, sizeof(conf), "[S] 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); }