Yet another runit-rc overhaul (aka. how should we handle stage{1,3} and oneshot)
Alright. So, runit is a init and a service manager with process supervision, which means it must supervise a process, which makes it less than ideal to run one-shot scripts (e.g. iptables, alsa-utils). It also can only be run on stage 2 (or stage where getty has been setup, etc.), which means we need something else for stage 1 (or sysinit), and stage 3 (or shutdown). As of now, we already have a solution in form of bringing in Arch's old initscript and tailor it to the current situation.
For stage 2 scripts, we have pause from Void Linux which works as a workaround for one-shot services.
And for stage 1 and 3, we have a modifiable sysv-rc style "initscripts". Personally, I have to say I'm not fond of modifiable stage 1 and stage 3 since I think all scripts that we put there has to be essential for startup and shutdown of a system.
However, I do recognize there's a need for "non-essential" (i.e. not needed for boot and shutdown) oneshot services like static internet, and also there's network filesystems, iptables, etc. These need to be run in stage 2, preferably after we run network services.
Therefore, I hereby propose yet another overhaul for runit-rc system.
Currently, we have a sysv-rc style scripts for everything in stage 1. I'm going to change it into a Void Linux-style stage 1. Stage 3 will also get the same treatment.
For remaining one-shot services (e.g. static network, netfs, binfmt, alsa-utils, etc.) The current rc-sv system will most likely be used (and it will be run after we run the runit services), but rc-sv themselves will get yet another overhaul to allow handling true runit services (and to simplify its code). And it's more than likely that we change rc-sv into a better name, like service.
Of course, the old way of ln -s /etc/runit/sv/<service name> /run/runit/service and sv down <service name> will also be supported, but this will make our lives easier.
rc-sv is a semi-documented (no manpages, but there are some barebones help) method of handling sysinit and shutdown. But again as I said it earlier, I don't really like that method.
Since this is a "barebone" announcement, I figured you guys would have questions. Please, ask away. Or, if you have any opinions regarding my proposal, please speak your mind.