Hi,

On Fri, 17 Mar 2023 19:56:01 +0900
Olaf Meeuwissen <paddy-h...@member.fsf.org> wrote:

> > When runit is init, calling halt or reboot at the end of stage3 is
> > unecessary, so an easy solution to silent those warnings is to skip
> > halt and reboot scripts during the shutdown loop, so that reboot or
> > poweroff is carry on by runit code as stage 3 returns.
> 
> Apologies if I sound a bit clueless, but if runit is *not* init, it
> would still have to call halt and reboot scripts, right?

Not really: when runit is not init (like with runit-run package) boot
and shutdown are performed by the init in charge (sysvinit or systemd).
Runit-run package only runs stage 2 to spawn a runsvdir process.
In case of Sysvinit, scripts in /etc/rc0.d/ or /etc/rc6.d/ are run by
Sysv via /etc/init.d/rc script and Sysv's halt is used, so no problem
with "unsupported options".

Lorenzo

> 
> > There will be still one warning left for the -w flag but that is
> > already tracked in #992648 [2].
> 
> Ack.
> 
> > I prefer not to silence the warning in shutdown.c:
> >
> > * It nice for the user to be warned that a used flag is noop
> > * (more important) halt/reboot are called by other scripts or
> > programs in the system, and I don't have a complete picture of
> > that, so I'm using the warning to make debug easier in such
> > situations.
> 
> Ack and let me state, for the record, that I have even less of a
> picture of how all these bits fit together :-/
> 
> > Olaf, let me know if you would be unsatisfyied with the above
> > solution;
> 
> If it solves my (wishlist) issue and does not unduly inconvenience
> other use cases, I'm fine with it.
> 
> > [1] https://bugs.devuan.org/cgi/bugreport.cgi?bug=749
> > [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992648
> 
> Hope this helps,
> --
> Olaf Meeuwissen

Reply via email to