diff options
author | Jose Luis Duran <jlduran@FreeBSD.org> | 2024-11-15 04:28:01 +0000 |
---|---|---|
committer | Jose Luis Duran <jlduran@FreeBSD.org> | 2024-11-16 07:08:24 +0000 |
commit | 0f7b0db5dd07e7c48285db4cac19e15fc9a42622 (patch) | |
tree | 07c8f9dd6e0a4d6e097281c483dcc209c1417102 | |
parent | 4223c668e4b9ba71e2c6cfabbd66795729b7ff8b (diff) |
nanobsd: Fix cust_comconsole search patterns
The current patterns are outdated, and may produce "offifexists", after
e310437971b8 ("For video consoles, only launch a getty if the device
exists.").
Fix the expressions to:
1. Disable getty(8) on the virtual syscons(4) or vt(4) terminals
(/dev/ttyv*).
2. Enable the use of the first serial port as the system console.
Reviewed by: imp
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D47586
-rwxr-xr-x | tools/tools/nanobsd/defaults.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 1e38a07337c7..5cb137a1db94 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -742,10 +742,10 @@ UsbDevice ( ) { cust_comconsole ( ) ( # Enable getty on console - sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys + sed -i "" -e '/^tty[du]0/s/off/onifconsole/' ${NANO_WORLDDIR}/etc/ttys - # Disable getty on syscons devices - sed -i "" -e '/^ttyv[0-8]/s/ on/ off/' ${NANO_WORLDDIR}/etc/ttys + # Disable getty on syscons or vt devices + sed -i "" -E '/^ttyv[0-8]/s/\ton(ifexists)?/\toff/' ${NANO_WORLDDIR}/etc/ttys # Tell loader to use serial console early. echo "${NANO_BOOT2CFG}" > ${NANO_WORLDDIR}/boot.config |