void-runit icon indicating copy to clipboard operation
void-runit copied to clipboard

[RFC] Split run-level 3 script into separate files.

Open basploeger opened this issue 2 years ago • 2 comments

This is an attempt to implement the shutdown part of #23. This also supersedes both #56 and #29 (shutdown part only).

From #56 and my own use case (for which I need to add shutdown logic just before halt), it is clear that users need to be able to control at which point in the shutdown sequence their custom logic gets executed. A single hook point like in #29 is not flexible enough.

I think the easiest solution is to source scripts from a specific directory in lexicographic order, which is exactly how core-services are already started in run-level 1. I called the directory stop-services for analogy, but am open to suggestions. I left gaps in the scripts' priority numbers as needed to allow for custom logic to be injected at those places.

basploeger avatar Apr 09 '22 22:04 basploeger

I like this idea and have no suggestion for a better directory name.

ahesford avatar Jun 07 '22 12:06 ahesford

Will quibble on the name: Maybe /etc/runit/shutdown.d? I like the proposal.

Vaelatern avatar Jun 07 '22 15:06 Vaelatern

This is a better approach. Thanks @ahesford for mentioning it.

I'll close my PR #95. What do we need to do for getting this merged?

dataCobra avatar Oct 27 '22 15:10 dataCobra

I like this, and agree with vaelatern's name suggestion

classabbyamp avatar Oct 27 '22 15:10 classabbyamp

@void-linux/pkg-committers

ahesford avatar Oct 27 '22 15:10 ahesford

I continue to hold my position that I like the proposal, and that I still think /etc/runit/shutdown.d is reasonable.

Vaelatern avatar Oct 27 '22 19:10 Vaelatern

This also supersedes [...] #29 (shutdown part only).

I agree.

I called the directory stop-services for analogy, but am open to suggestions.

I think the name you pick is fine, but so is Vaelatern's. Both seem reasonable.

abenson avatar Oct 28 '22 02:10 abenson

I prefer the naming that @Vaelatern proposed.

I've the feeling that shutdown.d does get the message better to the user then stop-services.

Because the stop could be misunderstood, while shutdown.d does clearly stands for a system that is going to shutdown. Also the .d is a common way to describe a folder with configs that are loaded in an order.

This is of cause my personal opinion.

dataCobra avatar Oct 28 '22 12:10 dataCobra

Thanks for all the feedback! By popular request I have renamed the stop-services/ directory to shutdown.d/

Could I ask for this to be reviewed now?

basploeger avatar Nov 13 '22 08:11 basploeger

Thanks for the approvals. Whom do I ask to merge this PR?

basploeger avatar Nov 15 '22 20:11 basploeger

Let's let it sit awhile longer in case any late arrivals raise objections, but one of us will merge after a bit.

ahesford avatar Nov 15 '22 20:11 ahesford

Can this be merged now or do you want to wait longer?

basploeger avatar Jan 09 '23 15:01 basploeger

Thank you for your contribution, @basploeger !

Vaelatern avatar Jan 09 '23 18:01 Vaelatern