Bug#545448: [Pkg-sysvinit-devel] Bug#545448: invoke-rc.d should indicate whats wrong when not starting services
Dmitry Bogatov
KAction at debian.org
Fri Jan 11 12:36:52 GMT 2019
[2009-09-07 13:44] Henrique de Moraes Holschuh <hmh at debian.org>
> > > Which is also correct, invoke-rc.d is to be used in maintainer scripts, its
> > > result codes in default mode of operation are optimized for that usage.
> >
> > Yeah, I know that. And that is okay. However if it does not start a
> > service (for whatever reason) it should say WHY. It does so for
>
> Well, I am not oposed to that at all, it would be useful to add a "verbose"
> or even better, a very verbose "debug" mode to invoke-rc.d.
I believe I located place, where invoke-rc.d decides aganist starting
service in case, described by submitter.
From f548e3474b404e264fe9439b7543139f5b74a160 Mon Sep 17 00:00:00 2001
From: Dmitry Bogatov <KAction at debian.org>
Date: Thu, 10 Jan 2019 14:35:32 +0000
Subject: [PATCH] invoke-rc.d: warn about unmatching service and runlevel
Print warning, when `invoke-rc.d' refuses to start
service at current runlevel. (Closes: #545448)
---
script/invoke-rc.d | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/script/invoke-rc.d b/script/invoke-rc.d
index 27c045e..80e8401 100755
--- a/script/invoke-rc.d
+++ b/script/invoke-rc.d
@@ -406,10 +406,14 @@ else
if testexec ${SLINK} ; then
RC=104
elif testexec ${KLINK} ; then
+ printerror "${INITSCRIPTID} is supposed to be stopped on current runlevel (${RL})"
+ test x${FORCE} != x && printerror "proceeding anyway due --force"
RC=101
elif testexec ${SSLINK} ; then
RC=104
else
+ printerror "${INITSCRIPTID} is not supposed to be started on current runlevel (${RL})"
+ test x${FORCE} != x && printerror "proceeding anyway due --force"
RC=101
fi
;;
More information about the Pkg-systemd-maintainers
mailing list