Re: s6-linux-init without virtual consoles

From: <>
Date: Wed, 07 Jun 2023 11:12:02 +0200

"Laurent Bercot" <> writes:

>>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.)

No need to go sarcastic. Of-course I see that.

But a run-time test does not need to spam the user-visible console with
rather noisy warnings about missing features that was (on that system)
never intended to be there.

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

Yes, it works fine. But a warning is printed to console. And as it is so
early, it is not going to the (catchall) logger, but on the physical

> 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.

I agree.

> 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?

That would be better. And if we could have an option for setting the
verbosity level, so that info level messages could be avoided, I would
be really happy ;)

Received on Wed Jun 07 2023 - 11:12:02 CEST

This archive was generated by hypermail 2.4.0 : Wed Jun 07 2023 - 11:12:36 CEST