It is quite strange how debian uses /etc/service to store currently active 
services. Other
distributions use /run/runit or /var/service, though /run makes more sense. 
Perhaps /etc/service
could be moved somewhere else? This would solve the issue with etc being 
read-only. The concept of
symlinks from /etc/sv to /run, and then to current would still apply though. 
This would require
some package changes. To be honest, there's a lot about the way runit is 
packaged on Debian that
should be changed. The part about only having a handful of -run packages isn't 
a huge deal. I can
make them myself, although creating packages for those services would be handy.

On an unrelated note, runit uses sysvinit scripts to boot. While this is fine, 
if I want to use
runit and nothing else, I shouldn't need to have sysv-rc installed as some sort 
of backend. This
sort of leads to a wider issue that I'm not sure I should discuss here.

November 11, 2018 4:08 PM, "Dmitry Bogatov" <kact...@debian.org> wrote:

> Please keep BTS in CC.
> 
> [2018-11-09 22:35] alecfeld...@disroot.org
> 
>> If you look at the changes I made to stage 2, changing back to default
>> won't be a problem.
>> 
>> runlevel=default
>> for arg in $(cat /proc/cmdline); do
>> if [ -d /etc/runit/runsvdir/"$arg" ]; then
>> echo "Runlevel detected: '$arg' (via kernel cmdline)"
>> runlevel="$arg"
>> fi
>> done
>> 
>> runsvchdir "${runlevel}"
> 
> Ah, I start to understand your idea. While I see its merits, I believe
> it introduces even more moving parts in /etc, which ideally should be
> mounted read-only.
> 
> In any case, patch aganist https://salsa.debian.org/runit-team/runit
> would greatly help me understand your ideas fully.
> 
>> If there's a power outage, on the next boot runsvchdir will change
>> current back to default. It seems relatively simple to me, with the
>> unlikelihood of corner cases to develop. This is how runsvdirs are
>> handled in other runit based distributions from my experience.
> 
> In Debian situation is complicated by huge number of daemons, that do
> not have corresponding runscript. Actually, there is ~1300 daemons and
> handful of -run packages in sid.

Reply via email to