From 984e265523a100aad42ade1bdbc1e52472da48b5 Mon Sep 17 00:00:00 2001 From: Jake Burkholder Date: Mon, 27 Jan 2003 04:42:17 +0000 Subject: [PATCH] Change ofwcons to use the output-device property from the firmware for the name of the device that it creates. Update /etc/ttys accordingly. An alias is created for the old name so that old /etc/ttys will continue to work, but due to aliases being implemented as symlinks in devfs you cannot login as root when using the alias device. Discussed with: grehan --- etc/etc.sparc64/ttys | 8 ++++---- sys/dev/ofw/ofw_console.c | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/etc/etc.sparc64/ttys b/etc/etc.sparc64/ttys index b0e53e06319..6e5c5379b24 100644 --- a/etc/etc.sparc64/ttys +++ b/etc/etc.sparc64/ttys @@ -31,8 +31,10 @@ # If console is marked "insecure", then init will ask for the root password # when going to single-user mode. console none unknown off secure -# Openfirmware console -ofwcons "/usr/libexec/getty std.9600" vt100 on secure +# +screen "/usr/libexec/getty Pc" cons25 on secure +ttya "/usr/libexec/getty 3wire.9600" cons25 on secure +ttyb "/usr/libexec/getty 3wire.9600" cons25 off secure # #ttyv0 "/usr/libexec/getty Pc" cons25 on secure # Virtual terminals @@ -46,8 +48,6 @@ ofwcons "/usr/libexec/getty std.9600" vt100 on secure #ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttya "/usr/libexec/getty local.9600" dialup off secure -ttyb "/usr/libexec/getty local.9600" dialup off secure ttyd0 "/usr/libexec/getty std.9600" dialup off secure ttyd1 "/usr/libexec/getty std.9600" dialup off secure ttyd2 "/usr/libexec/getty std.9600" dialup off secure diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index aebc1094466..27f8766d791 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -93,8 +93,9 @@ cn_drvinit(void *unused) OF_getprop(options, "output-device", output, sizeof(output)) == -1) return; - make_dev(&ofw_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "ofwcons"); - make_dev_alias(ofw_consdev.cn_dev, "%s", output); + make_dev(&ofw_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "%s", + output); + make_dev_alias(ofw_consdev.cn_dev, "ofwcons"); } }