Commit Graph

12 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
1cde387c83 Improve missing tty handling in init(8). This removes a check that did
nothing - it was checking for ENXIO, which, with devfs, is no longer
returned - and was badly placed anyway, and replaces it with similar
one that works, and is done just before starting getty, instead of being
done when rereading ttys(5).

From the practical point of view, this makes init(8) handle disappearing
terminals (eg /dev/ttyU*) gracefully, without unneccessary getty restarts
and resulting error messages.

Reviewed by:	imp@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D14307
2018-02-27 10:54:15 +00:00
Pedro F. Giffuni
2321c47418 include: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:45:28 +00:00
Warner Losh
37b5835028 Impelemnt ttys onifexists in init.
Implement a new init(8) option in /etc/ttys. If this option is present
on the entry in /etc/ttys, the entry will be active if and only if it
exists.  If the name starts with a '/', it will be considered an
absolute path. If not, it will be a path relative to /dev.

This allows one to turn off video console getty that aren't present
(while running a getty on them even when they aren't the system
console). Likewise with serial ports.

It differs from onifconsole in only requiring the device exist rather
than it be listed as one of the system consoles.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D10037
2017-03-22 19:00:41 +00:00
Nathan Whitehorn
0894229871 Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the
device is an active kernel console and "off" otherwise. This is designed to
allow serial-booting x86 systems to provide a login prompt on the serial line
by default without providing one on all systems by default.

Comments and suggestions by:	grehan, dteske, jilles
MFC after:	1 month
2014-01-20 18:15:06 +00:00
Warner Losh
f2556687c6 Remove the Berkeley clause 3's.
Add a few $FreeBSD$
2010-02-16 19:39:50 +00:00
Warner Losh
bb28f3c29b Breath deep and take __P out of the system include files.
# This appears to not break X11, but I'm having problems compiling the
# glide part of the server with or without this patch, so I can't tell
# for sure.
2002-03-23 17:24:55 +00:00
Jordan K. Hubbard
52c5909ee2 MF22: prototype fix. 1998-07-16 00:10:14 +00:00
Bruce Evans
b2280d1b63 Fixed spelling of isnetworktty.
Fixed stray whitespace.
1997-04-14 13:33:20 +00:00
David Nugent
54065f6b44 Add bitflags TTY_NETWORK/TTY_DIALUP and interface functions which
make use of them.
1997-04-13 15:09:46 +00:00
David Nugent
a60c8a80bc Allow commonly-used "insecure" as a valid keyword in /etc/ttys.
This prevents keywords after "insecure" occurs being errnoeously
parsed as comments.
1997-02-15 05:45:00 +00:00
David Nugent
4ae89ecddd Added group= facility to /etc/ttys for tty grouping for more
more manageable and convenient referencing by login.conf (login
class database) and (e.g.) login.access.

This is the first of a group of commits which implements the login
class capabilities database.
1997-01-02 08:05:43 +00:00
Rodney W. Grimes
59deaec541 BSD 4.4 Lite Include Sources 1994-05-24 09:57:34 +00:00