333796 |
18-May-2018 |
gjb |
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 |
323986 |
25-Sep-2017 |
dab |
MFC r313107 (by danfe): Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8)
There is one capability explicitly documented in gettytab(5) as stupid: he. And it is indeed. It was meant to facilitate system hostname modification, but is hardly usable in practice because it allows very limited editing (e.g., it depends on a particular hostname length, making it non-generic).
Replace it with simple implementation that treats ``he'' as POSIX extended regular expression which is matched against the hostname. If there are no parenthesized subexpressions in the pattern, entire matched string is used as the final hostname. Otherwise, use the first matched subexpression. If the pattern does not match, the original hostname is not modified.
Using regex(3) gives more freedom, does not complicate the code very much, and makes a lot more sense, in turn making ``he'' less stupid and actually useful (e.g., it is now possible to obtain node or domain names from the original hostname string, without knowing it in advance).
Approved by: vangyzen (mentor) Sponsored by: Dell EMC |
260913 |
20-Jan-2014 |
nwhitehorn |
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
|
214680 |
02-Nov-2010 |
ed |
Add a new libc function: cfmakesane(3).
I've noticed various terminal emulators that need to obtain a sane default termios structure use very complex `hacks'. Even though POSIX doesn't provide any functionality for this, extend our termios API with cfmakesane(3), which is similar to the commonly supported cfmakeraw(3), except that it fills the termios structure with sane defaults.
Change all code in our base system to use this function, instead of depending on <sys/ttydefaults.h> to provide TTYDEF_*.
|
202274 |
14-Jan-2010 |
ed |
Phase out ttyslot(3).
The ttyslot() function was originally part for SUSv1, marked LEGACY in SUSv2 and removed later on. This function only makes sense when using utmp(5), because it was used to determine the offset of the record for the controlling TTY. It makes little sense to keep it here, because the new utmpx file format doesn't index based on TTY slots.
|
201380 |
02-Jan-2010 |
ed |
Make WARNS=6 the default for libexec/.
Just like bin/ and sbin/, I think setting WARNS to the highest value possible will make it more attractive for people to fix warnings.
- The WARNS variable is set in the Makefile in the directory of the application itself, making it more likely that it will be removed out of curiosity to see what happens. - New applications will most likely build with WARNS=6 out of the box, because the author would more likely fix the warnings during development than lower WARNS.
Unfortunately almost all apps in libexec require a lowered value of WARNS.
|
116482 |
17-Jun-2003 |
yar |
Improve the manpage language a bit. A PPP login program is started _automatically_ (i.e., without human intervention) even with the "pl" capability unset, as soon as a PPP frame is detected. But with "pl" set, a PPP login program is started independently of the result of PPP detection (which is rendered unnecessary then,) i.e. _unconditionally_.
|
116329 |
14-Jun-2003 |
green |
In the last clean-up of this code, the fact that the default tty mode information could only be gleaned from the the tty descriptor itself was neglected, so never did the tty's default settings get copied from the kernel. Specifically, this caused all manner of ctrl-keys to not work. Fix this by calling dogettytab() in all the proper places, and retrieving the terminfo temporarily in dogettytab().
|
116152 |
10-Jun-2003 |
yar |
General mdoc(7) markup fixes:
- Use .Va, not .Em, to mark up variable-like identifiers (capability and database entry names.) - Stop abusing .Tn (trademark) to emphasize general phrases. - Spot unmarked capability references. - Add a missing line break.
Discussed with: ru MFC after: 1 week
|
115900 |
06-Jun-2003 |
yar |
Fix some minor bugs, namely:
- Initialize "rval", which would be used uninitialized if al or pl options were set.
- Don't pass an empty string to login(1) as a user name (this could be triggered by entering a name and then killing it with backspace or ^U.)
- Don't loop endlessly if the al option specifies a bogus (i.e., not alphanumeric) auto-login name.
- Don't pass a bogus user name to login(1) if a good name were entered and then killed with ^U.
- Exit with status 0, not 1, on receiving an EOF character, since it's not a error condition.
MFC after: 1 week
|
109540 |
19-Jan-2003 |
sobomax |
Add a new gettytab(5) option - `pl', which if set tells getty that the line in question is PPP-only line, i.e. no PPP-sequence detection is necessary and PPP login program referenced by `pp' should be started automatically instead of login(1)
Feature suggested and sponsored by: United Networks of Ukraine No reply from: re MFC after: 2 weeks
|
21673 |
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
15645 |
05-May-1996 |
joerg |
Finally commit the changes that make getty(8) no longer depend on the COMPAT_43 cruft. This is supposedly the last core utility that has been using it! (So now, one should be able to remove this option from the config files. Be aware that the last officially released xterm however still requires it.)
The getty has been running now for several weeks on my modem line, so i feel safe about it.
Obtained from: mostly from the NetBSD vendor-branch
|