Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Switching ttys to /dev/constty by default (Was: Enabling xdm in sysinst breaks console login?)
On Sun, 9 Jun 2019 at 15:30, Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote:
> [... some clipped ...]
> ----------------------------
> revision 1.19
> date: 2008-10-07 14:00:01 +0400; author: abs; state: Exp; lines: +2 -1;
> branches: 1.19.18; 1.19.20;
> Add a constty entry, marked 'off', with otherwise the same settings
> as the console. Now when coming up in single user mode the tset in
> /.profile can set the terminal type correctly.
> Note: I believe constty should be 'on' and console 'off', but thats a
> separate discussion
> ----------------------------
> [...]
> ----------------------------
> revision 1.17
> date: 2003-10-04 11:41:12 +0400; author: dsl; state: Exp; lines: +2 -2;
> Revert 'console' back to /dev/console (from /dev/constty)
> ----------------------------
> revision 1.16
> date: 2003-10-03 18:54:21 +0400; author: dsl; state: Exp; lines: +2 -2;
> Change 'console' login to use /dev/constty so that its output isn't
> stolen by code that requests system messages using TIOCCONS.
> ----------------------------
>
> The original thread (it would be nice if people re-read it before
> starting the new bikeshed :)
>
> http://mail-index.netbsd.org/tech-kern/2003/10/03/0008.html
>
> was quite a bit antagonistic (hence the revert). From a quick
> refresher the positions seemed to be 1) "movable" console as in what
> the system currently booted with (what mrg described in the part of
> his message not quoted above) vs. 2) "fixed" console tty (using real
> hw entry, like tty00 or ttyE0 or whatever).
>
> As I was using sparcs at that time and booting them once headless and
> once headful is pretty easy (the OFW just DTRT) I liked the change. I
> didn't care for the bikeshed about the default. :)
>
> I haven't thought this through, but my uninfomred opinion is that
> constty would seem be a more robust default in the "sh*t happens"
> scenario where you need to boot with unusual console setup (headless
> instead of headful or vice versa). It takes care of the TIOCCONS.
> People that want console wired down to specific hw device has to edit
> the ttys either way.
I would strongly agree on the view that the ability to edit /etc/ttys
to set getty on specific devices (/dev/ttyE0 /dev/ttya...) is
essential, but it just makes sense for the default to be "run a getty
on the console, wherever that happens to be". Its less fragile and
matches POLS of "this is the tty where console output is going by
default, so thats where the console getty lives"
Xtos did make a potentially quite good point against switching:
"I think that the way our console code behaves is broken, and should
be fixed. Adding another device makes people depend on its existence,
and when we fix the console issues differently becomes just legacy."
However, given its been 16 years since /dev/constty was added, its
unlikely its going away as a feature, and using it would specifically
fix the use case of
- user enables xdm via sysinst, or adds 'xdm=YES' to rc.conf
- user can no longer login via Ctrl+Alt+F1 console
Can we switch /dev/ttys to using it by default?
David
Home |
Main Index |
Thread Index |
Old Index