diff options
author | gjb <gjb@FreeBSD.org> | 2018-05-18 14:57:58 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2018-05-18 14:57:58 +0000 |
commit | 630222de41b8cb3b18a61d59e8fa395d533e97fe (patch) | |
tree | 45e31405457becced671b631a52d4ff7e4166476 /libexec | |
parent | fcab6c1e9f9602099dc6b4b34d38da972a7059bd (diff) | |
download | FreeBSD-src-630222de41b8cb3b18a61d59e8fa395d533e97fe.zip FreeBSD-src-630222de41b8cb3b18a61d59e8fa395d533e97fe.tar.gz |
MFC r315733, r315737, r315740, r330054:
r315733 (imp):
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.
r315737 (ngie):
Unbreak world by adding sys/stat.h for stat(2)
r315740 (imp):
Simplify the code a little.
r330054 (trasz):
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.
Reported by: Bart Ender, Andre Albsmeier
PR: 228315
Blocks: 11.2-BETA2
Approved by: re (marius)
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/getty/ttys.5 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libexec/getty/ttys.5 b/libexec/getty/ttys.5 index d4c7f1d..1150909 100644 --- a/libexec/getty/ttys.5 +++ b/libexec/getty/ttys.5 @@ -28,7 +28,7 @@ .\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" " -.Dd March 9, 2014 +.Dd March 16, 2017 .Dt TTYS 5 .Os .Sh NAME @@ -105,6 +105,12 @@ should (should not) execute the command given in the second field. ``onifconsole'' will cause this line to be enabled if and only if it is an active kernel console device (it is equivalent to ``on'' in this case). +The flag ``onifexists'' will cause this line to be enabled if and only +if the name exists. +If the name starts with a ``/'', it will be considered an absolute +path. +Otherwise, it is considered a path relative to +.Pa /dev . The flag ``secure'' (if the console is enabled) allows users with a uid of 0 to login on this line. |