:: [devuan-dev] bug#881: invoke-rc.d: …
Kezdőlap
Delete this message
Reply to this message
Szerző: Opty
Dátum:  
Címzett: Mark Hindley
CC: 881
Tárgy: [devuan-dev] bug#881: invoke-rc.d: Policy layer may override runlevel constraint
On Thu, Apr 3, 2025 at 8:46 AM Mark Hindley <mark@???> wrote:
> On Wed, Apr 02, 2025 at 11:27:15PM +0200, Opty wrote:
> > You may want to upgrade ASAP but restart when convenient (e.g. during
> > low traffic at night) but maybe also a habit from Slackware in my
> > case.
>
> That isn't conventional Debian practice.


I could continue using the policy layer unmodified, selectively allow
what I need (extra work) and keep denied the rest

-or-

modify invoke-rc.d or rather policy-rc.d to check
$DPKG_MAINTSCRIPT_NAME (to detect preinst, postinst, prerm or postrm
script), crosscheck $DPKG_MAINTSCRIPT_PACKAGE vs. $INITSCRIPTID
(substring of each other) to allow calling other scripts and
eventually do nothing, maybe ask the administrator.

Both seem unintentional error- or side-effect-prone.

I could also just modify invoke-rc.d to skip the querypolicy call in
case of K link.

> > > To start or not on install is specified in the package by the maintainer.
> >
> > On our VPS I haven't found any which doesn't start service on package install.
>
> It certainly isn't common. But, for example, look at src:netperf: d/rules has
>
> override_dh_installinit:
>         dh_installinit --no-enable --no-start

>
> and the daemon is not started on install.


Maybe dh_installinit could support conditional start based on
environment variable.

Regards,
Opty