Subject: Re: [devuan-dev] bug#882: /etc/logrotate.d/lighttpd: Questionable use of invoke-rc.d

From: Opty <[email-masked]>
Date: Wed, 2 Apr 2025 15:20:39 +0200

On Wed, Apr 2, 2025 at 2:42 PM Opty <[email-masked]> wrote:
> On Wed, Apr 2, 2025 at 2:12 PM Lorenzo <[email-masked]> wrote:
> > Please don't: while this may solve your use case it will break other
> > more common use cases that are currently working.
> > Example:
> > lighttpd installed but disabled by the local admin (K links) but if
> > service wrapper is used instead of invoke-rc.d the logrotate snippet
> > will try to signal lighttpd regardless, which should not happen.
>
> Good, no work for me. :-)
>
> I should have written that I was actually afraid of something like
> that in general but 'service' seemed as the best proposal at that
> time. See also #881.

I recalled why I proposed 'service' and even reported all of these:

"invoke-rc.d and policy-rc.d are precisely interfaces expected to be
used only by maintainer scripts. Anything else done during run-time
should be using some other interface, such as service(8) for example
or an init specific one, otherwise that should be considered a bug."

and

"In case this is a local problem where you have deployed
non-maintainer scripts using invoke-rc.d, then while you fix those,
you could check in policy-rc.d if you are running inside dpkg by
checking if the environment variable DPKG_RUNNING_VERSION is defined
(documented in dpkg(1))."

(see https://bugs.debian.org/804018#25)

Regards,
Opty