From 2a23bce78dbaf6c96edcf9de30243c3310ef874f Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 31 May 2021 07:17:48 +0200 Subject: [PATCH] Hide progress output also on stop/shutdown for services w/o -- descr Progress at startup has been hidden for services w/o -- description, but for some reason this check was not added to service_stop(). This patch rectifies the situation, finally. Signed-off-by: Joachim Wiberg --- src/service.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index 9aacd89b..52068044 100644 --- a/src/service.c +++ b/src/service.c @@ -702,6 +702,7 @@ static void service_cleanup(svc_t *svc) */ static int service_stop(svc_t *svc) { + int do_progress = 1; int rc = 0; if (!svc) @@ -726,7 +727,10 @@ static int service_stop(svc_t *svc) svc_set_state(svc, SVC_STOPPING_STATE); - if (runlevel != 1) + if (!svc->desc[0]) + do_progress = 0; + + if (runlevel != 1 && do_progress) print_desc("Stopping ", svc->desc); if (!svc_is_sysv(svc)) {