<div dir="ltr"><div dir="ltr"><br class="gmail-Apple-interchange-newline">Hi, <br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 11, 2019 at 9:39 AM Dmitry Bogatov <<a href="mailto:KAction@debian.org">KAction@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
control: tags -1 +patch<br></blockquote><div><br></div><div>Please submit patches as MRs in salsa, it makes for easier review.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
[2011-06-14 11:39] Joey Hess <<a href="mailto:joeyh@debian.org" target="_blank">joeyh@debian.org</a>><br>
><br>
> part 1     text/plain                 618<br>
> Helmut Grohne wrote:<br>
> > A failure from the update-rc.d cannot make postinst fail, because the<br>
> > exit code is not checked. <br>
> <br>
> Yes it is (set -x), but I meant invoke-rc.d anyway, obviously.<br>
> <br>
> > So in my view the reason for a postinst failure is unrelated to<br>
> > update-rc.d. Can you explain your reasoning?<br>
> <br>
> Simple separation of concerns, invoke-rc.d is responsible for running<br>
> the init script and determining if it fails and propigating a failing<br>
> exit status. debhelper allows it to do do. The right way to make 6 be<br>
> ignored is to get invoke-rc.d to ignore it, not add cruft to every<br>
> postinst that calls it.<br>
<br>
Here I propose patch to implement just that:<br>
<br>
>From 77c189d0f87a53a93f48b08594c8e7ee864b6e5e Mon Sep 17 00:00:00 2001<br>
From: Dmitry Bogatov <<a href="mailto:KAction@debian.org" target="_blank">KAction@debian.org</a>><br>
Date: Thu, 10 Jan 2019 16:31:32 +0000<br>
Subject: [PATCH] invoke-rc.d: exit value 6 from init script is fine<br>
<br>
Consider exit value 6 from init script (service not configured) as<br>
successful invocation (Closes: #629902)<br>
---<br>
 script/invoke-rc.d | 4 +++-<br>
 1 file changed, 3 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/script/invoke-rc.d b/script/invoke-rc.d<br>
index 80e8401..d4ac2c6 100755<br>
--- a/script/invoke-rc.d<br>
+++ b/script/invoke-rc.d<br>
@@ -554,9 +554,11 @@ if test x${FORCE} != x || test ${RC} -eq 104 ; then<br>
            elif [ -n "$is_openrc" ]; then<br>
                rc-service "${INITSCRIPTID}" "${saction}" && exit 0<br>
            else<br>
-               "${INITDPREFIX}${INITSCRIPTID}" "${saction}" "$@" && exit 0<br>
+               "${INITDPREFIX}${INITSCRIPTID}" "${saction}" "$@"<br>
            fi<br>
            RC=$?<br>
+           [ "${RC}" = 0 ] && exit 0<br>
+           [ "${RC}" = 6 ] && exit 0 # service not configured. See #629902<br></blockquote><div><br></div><div>I'm wary of unintended consequences here. Do we have services that return exit code 6 but as a failure code? </div></div>-- <br><div dir="ltr" class="gmail_signature"><br>Saludos,<br>Felipe Sateler</div></div>