Re: s6-linux-init without virtual consoles

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Thu, 01 Jun 2023 17:19:55 +0000

>I think it would be fair to be able to configure s6-linux-init so that
>it does not rely on specific details about what hardware is available.

  Then I have some good news for you: s6-linux-init already does not
rely on specific details about what hardware is available.

  Because if it did, and assumed that you have a virtual console, and you
didn't, then it would crash. And you would be a very sad panda. And
so would I.

  But it doesn't.

  What you're seeing is known as a run-time test: the existence of a
/dev/tty0 device is tested. And if such a device exists, then s6-l-i
attempts to support kbrequest on it. See? conditional support. It's
nice and sweet and simple and has fewer failure cases (because the
more configuration switches you have, the more you risk human error.)

  When you don't have a virtual console, s6-l-i works perfectly fine.

  If there was no warning message, you would never have noticed the extra
system call, and you wouldn't be here asking for offline configuration
where online configuration works. But there is a warning message, and
that's what you don't like.

  So yes, the problem you have *is* the warning message per se, not the
fact that s6-l-i performs one completely undetectable superflous open()
call in headless systems.

  So let's talk about the message.
  I agree it's not particularly elegant to print a warning on every boot
in a normal configuration. So it could be refined: if devtmpfs can be
relied on to always provide /dev/tty0 when a console exists, then
when there's no such device, instead of "warning: missing device",
s6-l-i could print "info: headless system detected".

  I think that would be less scary than a "warning", and users of
headless
and headful (?) systems could keep living together in peace and harmony.

  What do you think?

--
  Laurent
Received on Thu Jun 01 2023 - 19:19:55 CEST

This archive was generated by hypermail 2.4.0 : Thu Jun 01 2023 - 19:20:23 CEST