On Thu, 28 Jul 2022 15:11:58 -0500, Andrew Daugherity wrote:
> This is probably worth a mention in the ttys(5) man page. It's one of
> those things that once you've worked through it, you know, but it's
> not at all obvious that HUP-ing init applies changes from every other
> column but NOT any flags changes. I think the wording NetBSD has [1]
> is decent:
> "Nota Bene: Sending SIGHUP to init(8) does not change the state of the
> various tty(4) device flags listed above; the ttyflags(8) program must
> be run for changes in those flags to take effect on the devices."
How does this look? I couldn't resist making some other minor
tweaks while there.
- todd
Index: libexec/getty/ttys.5
===================================================================
RCS file: /cvs/src/libexec/getty/ttys.5,v
retrieving revision 1.13
diff -u -p -u -r1.13 ttys.5
--- libexec/getty/ttys.5 8 Feb 2020 01:09:57 -0000 1.13
+++ libexec/getty/ttys.5 29 Jul 2022 01:46:57 -0000
@@ -1,4 +1,5 @@
.\" $OpenBSD: ttys.5,v 1.13 2020/02/08 01:09:57 jsg Exp $
+.\"
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -42,6 +43,7 @@ and control the use of terminal special
This information is read with the
.Xr getttyent 3
library routines.
+.Pp
There is one line in the
.Nm
file per special device file.
@@ -54,24 +56,29 @@ are delimited by hash marks
and newlines.
Any unspecified fields will default to null.
.Pp
+Each line in
+.Nm
+is of the format:
+.Dl tty command type flags
+.Pp
The first field is the
name of the terminal special file as it is found in
.Pa /dev .
.Pp
-The second field of the file is the command to execute for the line,
+The second field is the command to execute for the line,
usually
.Xr getty 8 ,
which initializes and opens the line, setting the speed, waiting for
a user name and executing the
.Xr login 1
-program.
+utility.
It can be, however, any desired command, for example
the start up for a window system terminal emulator or some other
daemon process, and can contain multiple words if quoted.
.Pp
The third field is the type of terminal usually connected to that
-TTY line, normally the one found in the
-.Xr termcap 5
+tty line, normally the one found in the
+.Xr terminfo 5
database file.
The environment variable
.Dv TERM
@@ -87,7 +94,7 @@ entry (see
or specify a window system process that
.Xr init 8
will maintain for the terminal line.
-The following is a list of permitted flags for each TTY:
+The following is a list of permitted flags for each tty:
.Bl -tag -width xxxxxxx
.It Ar on
Specify that
@@ -98,7 +105,7 @@ The opposite of on.
.It Ar secure
If
.Ar on
-is also specified, allows users with a UID of 0 to log in on this line.
+is also specified, allows users with a user ID of 0 to log in on this line.
If set for the
.Ar console
entry, then
@@ -130,11 +137,21 @@ will execute
.Em before
starting the command specified by the second field.
.Pp
-Changes to the ttys file take effect after it has been reloaded by
+Changes to the
+.Nm
+file take effect after it has been reloaded by
.Xr init 8 ,
which can be triggered by sending it a
.Dv HUP
signal.
+Reloading the
+.Nm
+file does
+.Em not
+change the state of the device-specific terminal flags described above.
+The
+.Xr ttyflags 8
+utility can be used to set those flags.
.Sh FILES
.Bl -tag -width /etc/ttys -compact
.It Pa /etc/ttys
No comments:
Post a Comment