void-runit
void-runit copied to clipboard
[RFC] Split run-level 3 script into separate files.
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.
I like this idea and have no suggestion for a better directory name.
Will quibble on the name:
Maybe
/etc/runit/shutdown.d
?
I like the proposal.
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?
I like this, and agree with vaelatern's name suggestion
@void-linux/pkg-committers
I continue to hold my position that I like the proposal, and that I still think /etc/runit/shutdown.d
is reasonable.
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.
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.
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?
Thanks for the approvals. Whom do I ask to merge this PR?
Let's let it sit awhile longer in case any late arrivals raise objections, but one of us will merge after a bit.
Can this be merged now or do you want to wait longer?
Thank you for your contribution, @basploeger !