On Mon, 3 Nov 2025 10:07:52 +0100
Marc Haber <[email protected]> wrote:

> Hi,
> 
> On Sun, Nov 02, 2025 at 09:34:12PM -0600, Aaron Rainbolt wrote:
> >zg-policy-rc.d currently has a fallback mechanism for finding the
> >proper policy-rc.d file:
> >
> >* If `POLICYRCD` is already set, use the script the variable points
> >to.
> >* Otherwise, source `/etc/zg-policy-rc.d.conf`, and if `POLICYRCD` is
> >  now set, use the script the variable points to.
> >* If `POLICYRCD` still isn't set, try to use
> >  `/usr/local/sbin/policy-rc.d`.
> >* And if that fails, then try to use `/etc/policy-rc.d`.  
> 
> This looks like this needs a major internal rework. I had to read my
> own code to understand its shortcomings as I assumed it was way more 
> sophisticated. Alas, it isn't.
> 
> >This is good, but it means for an application or package that needs
> >to introduce controls for service restarts for whatever reason,
> >there's no way for it to insert it's own `policy-rc.d`
> >implementation that `zg-policy-rc.d` will pick up, without having to
> >override either `/usr/local/sbin/policy-rc.d` or
> >`/etc/zg-policy-rc.d.conf`, both of which are non-ideal.  
> 
> I am not sure whether I intended this package to be used by another 
> package. And I am not sure whether policy-rc.d will work reliably on
> a systemd system. I wrote that one 20 years ago and the code hasn't
> been touched ever since.

My use case for it is just controlling what services do and don't
restart during apt upgrades, which does still work with systemd.

> >Would this be a feature that an interested user could contribute?
> >A Debian derivative I work with (Kicksecure) has a use case that
> >would benefit from this, and I can probably send a patch to
> >implement it.  
> 
> Would you want to take over or co-maintain the package? I can put the 
> package on salsa and you can file a merge request. I just can't 
> guarantee that the code will work under all circumstances.

Sure, that would be great. Thanks for the offer!

--
Aaron

> Greetings
> Marc
> 

Attachment: pgpmeJ7YA4POM.pgp
Description: OpenPGP digital signature

Reply via email to