diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-03-28 18:53:41 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-03-28 18:53:41 +0000 |
commit | 98cdd431019e32cb85a08b3d0a89f44359bd33c7 (patch) | |
tree | cfb09ebf28afbd32636f717ed731e28267c916d9 | |
parent | 7fded7fc22609d6c9556325dcea986cbf96cd086 (diff) |
Running getty(8) on /dev/console when using a glass console interferes with
running Xorg in a way that isn't fully understood. So change the arm64
install.md to munge /etc/ttys to enable the ttyC0 entry if we detect that
wsdisplay0 is the console and make sure the code in install.sub that
does the actual munging disables the console entry before enabling another
entry to prevent running two getty(8) processes on (effectively) the same
device.
ok deraadt@
-rw-r--r-- | distrib/arm64/ramdisk/install.md | 9 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/distrib/arm64/ramdisk/install.md b/distrib/arm64/ramdisk/install.md index 2fe08eb030c..abd5fdfdc1b 100644 --- a/distrib/arm64/ramdisk/install.md +++ b/distrib/arm64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.29 2022/03/22 15:38:27 kettenis Exp $ +# $OpenBSD: install.md,v 1.30 2022/03/28 18:53:40 kettenis Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -190,8 +190,13 @@ md_congrats() { md_consoleinfo() { local _fw - CTTY=console DEFCONS=y + case $(scan_dmesg '/^\([^ ]*\).*: console.*std.*$/s//\1/p') in + wsdisplay0) + CTTY=ttyC0;; + *) + CTTY=console;; + esac case $CSPEED in 9600|19200|38400|57600|115200|1500000) ;; diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 379671e7b6a..6c58c01a668 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1192 2022/02/06 11:29:18 visa Exp $ +# $OpenBSD: install.sub,v 1.1193 2022/03/28 18:53:40 kettenis Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -2774,7 +2774,8 @@ apply() { if [[ $DEFCONS == y ]]; then cp /mnt/etc/ttys /tmp/i/ttys - sed -e "/^$CTTY/s/std.9600/std.${CSPEED}/" \ + sed -e "/^console/s/on secure/off secure/" \ + -e "/^$CTTY/s/std.9600/std.${CSPEED}/" \ -e "/^$CTTY/s/std.115200/std.${CSPEED}/" \ -e "/^$CTTY/s/unknown/vt220 /" \ -e "/$CTTY/s/off.*/on secure/" /tmp/i/ttys >/mnt/etc/ttys |