Penguin
Annotated edit history of getty(8) version 4, including all changes. View license author blame.
Rev Author # Line
1 perry 1 !!NAME
3 CraigBox 2 getty - alternative Linux getty
1 perry 3
4 !!SYNOPSIS
3 CraigBox 5 __getty __ [[-ihLmnw] [[-f ''issue_file'' ] [[-l ''login_program'' ] [[-I ''init'' ] [[-t ''timeout'' ] [[-H ''login_host'' ] ''port'' ''baud_rate,...'' [[ ''term'' ]
6 __getty __ [[-ihLmnw] [[-f ''issue_file'' ] [[-l ''login_program'' ] [[-I ''init'' ] [[-t ''timeout'' ] [[-H ''login_host'' ] ''baud_rate,...'' ''port'' [[ ''term'' ]
1 perry 7
8 !!DESCRIPTION
9
3 CraigBox 10 __getty__ opens a tty port, prompts for a login name and invokes the /bin/login command. It is normally invoked by ''init(8)''.
1 perry 11
3 CraigBox 12 __getty__ has several ''non-standard'' features that are useful for hard-wired and for dial-in lines:
13 * Adapts the tty settings to parity bits and to erase, kill, end-of-line and uppercase characters when it reads a login name. The program can handle 7-bit characters with even, odd, none or space parity, and 8-bit characters with no parity. The following special characters are recognized: @ and Control-U (kill); #, DEL and back space (erase); carriage return and line feed (end of line).
14 * Optionally deduces the baud rate from the CONNECT messages produced by Hayes(tm)-compatible modems.
15 * Optionally does not hang up when it is given an already opened line (useful for call-back applications).
16 * Optionally does not display the contents of the ''/etc/issue'' file.
17 * Optionally displays an alternative issue file instead of ''/etc/issue''.
18 * Optionally does not ask for a login name.
19 * Optionally invokes a non-standard login program instead of ''/bin/login''.
20 * Optionally turns on hard-ware flow control
21 * Optionally forces the line to be local with no need for carrier detect.
1 perry 22
3 CraigBox 23 This program does not use the ''/etc/gettydefs'' (System V) or ''/etc/gettytab'' (SunOS 4) files.
1 perry 24
25 !!ARGUMENTS
26
3 CraigBox 27 ;port : A path name relative to the ''/dev'' directory. If a "-" is specified, __getty__ assumes that its standard input is already connected to a tty port and that a connection to a remote user has already been established.
1 perry 28
3 CraigBox 29 Under System V, a "-" ''port'' argument should be preceded by a "--".
30 ;baud_rate,... : A comma-separated list of one or more baud rates. Each time __getty__ receives a BREAK character it advances through the list, which is treated as if it were circular.
1 perry 31
3 CraigBox 32 Baud rates should be specified in descending order, so that the null character (Ctrl-@) can also be used for baud rate switching.
33 ;term : The value to be used for the TERM environment variable. This overrides whatever init(8) may have set, and is inherited by login and the shell.
1 perry 34
35 !!OPTIONS
36
3 CraigBox 37 ;-h : Enable hardware (RTS/CTS) flow control. It is left up to the application to disable software (XON/XOFF) flow protocol where appropriate.
38 ;-i : Do not display the contents of ''/etc/issue'' (or other) before writing the login prompt. Terminals or communications hardware may become confused when receiving lots of text at the wrong baud rate; dial-up scripts may fail if the login prompt is preceded by too much text.
39 ;-f ''issue_file'' : Display the contents of ''issue_file'' instead of ''/etc/issue''. This allows custom messages to be displayed on different terminals. The -i option will override this option.
40 ;-I ''initstring'' : Set an initial string to be sent to the tty or modem before sending anything else. This may be used to initialize a modem. Non printable characters may be sent by writing their octal code preceded by a backslash (\). For example to send a linefeed character (ASCII 10, octal 012) write 12.
1 perry 41
42
3 CraigBox 43 ;-l ''login_program'' : Invoke the specified ''login_program'' instead of /bin/login. This allows the use of a non-standard login program (for example, one that asks for a dial-up password or that uses a different password file).
44 ;-H ''login_host'' : Write the specified ''login_host'' into the utmp file. (Normally, no login host is given, since __getty__ is used for local hardwired connections and consoles. However, this option can be useful for identifying terminal concentrators and the like.
45 ;-m : Try to extract the baud rate the CONNECT status message produced by Hayes(tm)-compatible modems. These status messages are of the form: "<junk><speed><junk>". __getty__ assumes that the modem emits its status message at the same speed as specified with (the first) ''baud_rate'' value on the command line.
1 perry 46
4 CraigBox 47 ;:Since the ''-m'' feature may fail on heavily-loaded systems, you still should enable BREAK processing by enumerating all expected baud rates on the command line.
3 CraigBox 48 ;-n : Do not prompt the user for a login name. This can be used in connection with -l option to invoke a non-standard login process such as a BBS system. Note that with the -n option, __getty__ gets no input from user who logs in and therefore won't be able to figure out parity, character size, and newline processing of the connection. It defaults to space parity, 7 bit characters, and ASCII CR (13) end-of-line character. Beware that the program that __getty__ starts (usually /bin/login) is run as root.
49 ;-t ''timeout'' : Terminate if no user name could be read within ''timeout'' seconds. This option should probably not be used with hard-wired lines.
50 ;-L : Force the line to be a local line with no need for carrier detect. This can be useful when you have a locally attached terminal where the serial line does not set the carrier detect signal.
51 ;-w : Wait for the user or the modem to send a carriage-return or a linefeed character before sending the ''/etc/issue'' (or other) file and the login prompt. Very useful in connection with the -I option.
1 perry 52
53
54
55 !!EXAMPLES
3 CraigBox 56 This section shows examples for the process field of an entry in the ''/etc/inittab'' file. You'll have to prepend appropriate values for the other fields. See ''inittab(5)'' for more details.
1 perry 57
3 CraigBox 58 For a hard-wired line or a console tty: +5 /sbin/getty 9600 ttyS1
1 perry 59
3 CraigBox 60 For a directly connected terminal without proper carriage detect wiring: (try this if your terminal just sleeps instead of giving you a password: prompt.) +5 /sbin/getty -L 9600 ttyS1 vt100
1 perry 61
3 CraigBox 62 For a old style dial-in line with a 9600/2400/1200 baud modem: +5 /sbin/getty -mt60 ttyS1 9600,2400,1200
1 perry 63
3 CraigBox 64 For a Hayes modem with a fixed 115200 bps interface to the machine: (the example init string turns off modem echo and result codes, makes modem/computer DCD track modem/modem DCD, makes a DTR drop cause a dis-connection and turn on auto-answer after 1 ring.) +5 /sbin/getty -w -I 'ATE0Q1&D2&C1S0=1 15' 115200 ttyS1
1 perry 65
66
67 !!ISSUE ESCAPES
3 CraigBox 68 The issue-file (''/etc/issue'' or the file set with the -f option) may contain certain escape codes to display the system name, date and time etc. All escape codes consist of a backslash (\) immediately followed by one of the letters explained below.
1 perry 69
70
3 CraigBox 71 ;b : Insert the baudrate of the current line.
72 ;d : Insert the current date.
73 ;s : Insert the system name, the name of the operating system.
74 ;l : Insert the name of the current tty line.
75 ;m : Insert the architecture identifier of the machine, eg. i486
76 ;n : Insert the nodename of the machine, also known as the hostname.
77 ;o : Insert the domainname of the machine.
78 ;r : Insert the release number of the OS, eg. 1.1.9.
79 ;t : Insert the current time.
80 ;u : Insert the number of current users logged in.
81 ;U : Insert the string "1 user" or "<n> users" where <n> is the number of current users logged in.
82 ;v : Insert the version of the OS, eg. the build-date etc.
1 perry 83
3 CraigBox 84 Example: On my system, the following ''/etc/issue'' file:
1 perry 85
3 CraigBox 86 This is \n.\o (\s \m \r) \t %%%
1 perry 87
3 CraigBox 88 displays as
1 perry 89
3 CraigBox 90 This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
1 perry 91
92
3 CraigBox 93 !!FILES
1 perry 94
3 CraigBox 95 /var/run/utmp, the system status file. %%%
96 /etc/issue, printed before the login prompt. %%%
97 /dev/console, problem reports (if syslog(3) is not used). %%%
98 /etc/inittab, ''init''(8) configuration file. %%%
1 perry 99
100
101 !!BUGS
102
3 CraigBox 103 The baud-rate detection feature (the ''-m'' option) requires that __getty__ be scheduled soon enough after completion of a dial-in call (within 30 ms with modems that talk at 2400 baud). For robustness, always use the ''-m'' option in combination with a multiple baud rate command-line argument, so that BREAK processing is enabled.
1 perry 104
3 CraigBox 105 The text in the ''/etc/issue'' file (or other) and the login prompt are always output with 7-bit characters and space parity.
1 perry 106
3 CraigBox 107 The baud-rate detection feature (the ''-m'' option) requires that the modem emits its status message ''after'' raising the DCD line.
1 perry 108
109 !!DIAGNOSTICS
110
3 CraigBox 111 Depending on how the program was configured, all diagnostics are written to the console device or reported via the syslog(3) facility. Error messages are produced if the ''port'' argument does not specify a terminal device; if there is no utmp entry for the current process (System V only); and so on.
1 perry 112
113 !!AUTHOR(S)
114
3 CraigBox 115 W.Z. Venema <wietse@wzv.win.tue.nl> %%%
116 Eindhoven University of Technology %%%
117 Department of Mathematics and Computer Science %%%
118 Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
119
120 Peter Orbaek <poe@daimi.aau.dk> %%%
121 Linux port and more options. Still maintains the code. %%%
122
123 Eric Rasmussen <ear@usfirst.org> %%%
124 Added -f option to display custom login messages on different terminals.
1 perry 125
126 !!CREATION DATE
127
3 CraigBox 128 Sat Nov 25 22:51:05 MET 1989 %%%
1 perry 129
130
3 CraigBox 131 !!LAST MODIFICATION
132 96/07/20 %%%
1 perry 133
134 ----
3 CraigBox 135 From everything i have read, i dont believe that this method will work with non-serial modems such as PCI card. If im wrong about this statement, someone please tell me.
2 WikiWord 136 Abruces@cfl.rr.com
137 Thanks, Adam Smith
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 15 times)