242 lines
6.8 KiB
Groff
242 lines
6.8 KiB
Groff
|
.TH AGETTY 8
|
||
|
.ad
|
||
|
.fi
|
||
|
.SH NAME
|
||
|
agetty \- alternative Linux getty
|
||
|
.SH SYNOPSIS
|
||
|
.na
|
||
|
.nf
|
||
|
agetty [-ihL] [-l login_program] [-m] [-t timeout] port baud_rate,... [term]
|
||
|
agetty [-ihL] [-l login_program] [-m] [-t timeout] baud_rate,... port [term]
|
||
|
.SH DESCRIPTION
|
||
|
.ad
|
||
|
.fi
|
||
|
\fIagetty\fP opens a tty port, prompts for a login name and invokes
|
||
|
the /bin/login command. It is normally invoked by \fIinit(8)\fP.
|
||
|
|
||
|
\fIagetty\fP has several \fInon-standard\fP features that are useful
|
||
|
for hard-wired and for dial-in lines:
|
||
|
.IP o
|
||
|
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).
|
||
|
.IP o
|
||
|
Optionally deduces the baud rate from the CONNECT messages produced by
|
||
|
Hayes(tm)-compatible modems.
|
||
|
.IP o
|
||
|
Optionally does not hang up when it is given an already opened line
|
||
|
(useful for call-back applications).
|
||
|
.IP o
|
||
|
Optionally does not display the contents of the \fI/etc/issue\fP file
|
||
|
(System V only).
|
||
|
.IP o
|
||
|
Optionally invokes a non-standard login program instead of
|
||
|
\fI/bin/login\fP.
|
||
|
.IP o
|
||
|
Optionally turns on hard-ware flow control
|
||
|
.IP o
|
||
|
Optionally forces the line to be local with no need for carrier detect.
|
||
|
.PP
|
||
|
This program does not use the \fI/etc/gettydefs\fP (System V) or
|
||
|
\fI/etc/gettytab\fP (SunOS 4) files.
|
||
|
.SH ARGUMENTS
|
||
|
.na
|
||
|
.nf
|
||
|
.fi
|
||
|
.ad
|
||
|
.TP
|
||
|
port
|
||
|
A path name relative to the \fI/dev\fP directory. If a "-" is
|
||
|
specified, \fIagetty\fP assumes that its standard input is
|
||
|
already connected to a tty port and that a connection to a
|
||
|
remote user has already been established.
|
||
|
.sp
|
||
|
Under System V, a "-" \fIport\fP argument should be preceded
|
||
|
by a "--".
|
||
|
.TP
|
||
|
baud_rate,...
|
||
|
A comma-separated list of one or more baud rates. Each time
|
||
|
\fIagetty\fP receives a BREAK character it advances through
|
||
|
the list, which is treated as if it were circular.
|
||
|
.sp
|
||
|
Baud rates should be specified in descending order, so that the
|
||
|
null character (Ctrl-@) can also be used for baud rate switching.
|
||
|
.TP
|
||
|
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.
|
||
|
.SH OPTIONS
|
||
|
.na
|
||
|
.nf
|
||
|
.fi
|
||
|
.ad
|
||
|
.TP
|
||
|
-h
|
||
|
Enable hardware (RTS/CTS) flow control. It is left up to the
|
||
|
application to disable software (XON/XOFF) flow protocol where
|
||
|
appropriate.
|
||
|
.TP
|
||
|
-i
|
||
|
Do not display the contents of \fI/etc/issue\fP 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.
|
||
|
.TP
|
||
|
-l login_program
|
||
|
Invoke the specified \fIlogin_program\fP 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).
|
||
|
.TP
|
||
|
-m
|
||
|
Try to extract the baud rate the \fIconnect\fP status message
|
||
|
produced by some Hayes(tm)-compatible modems. These status
|
||
|
messages are of the form: "<junk><speed><junk>".
|
||
|
\fIagetty\fP assumes that the modem emits its status message at
|
||
|
the same speed as specified with (the first) \fIbaud_rate\fP value
|
||
|
on the command line.
|
||
|
.sp
|
||
|
Since the \fI-m\fP feature may fail on heavily-loaded systems,
|
||
|
you still should enable BREAK processing by enumerating all
|
||
|
expected baud rates on the command line.
|
||
|
.TP
|
||
|
-t timeout
|
||
|
Terminate if no user name could be read within \fItimeout\fP
|
||
|
seconds. This option should probably not be used with hard-wired
|
||
|
lines.
|
||
|
.TP
|
||
|
-L
|
||
|
Force the line to be local line with no need for carrier detect. This can
|
||
|
be useful when you have locally attached terminal where the serial line
|
||
|
does not set the carrier detect signal.
|
||
|
|
||
|
.SH EXAMPLES
|
||
|
.na
|
||
|
.nf
|
||
|
This section shows sample entries for the \fI/etc/inittab\fP file.
|
||
|
|
||
|
For a hard-wired line:
|
||
|
.ti +5
|
||
|
tty1:con80x60:/sbin/agetty 9600 tty1
|
||
|
|
||
|
For a dial-in line with a 9600/2400/1200 baud modem:
|
||
|
.ti +5
|
||
|
ttyS1:dumb:/sbin/agetty -mt60 ttyS1 9600,2400,1200
|
||
|
|
||
|
These examples assume you use the simpleinit(8) init program for Linux.
|
||
|
If you use a SysV like init (does /etc/inittab mention "respawn"?), refer
|
||
|
to the appropriate manual page.
|
||
|
|
||
|
.SH ISSUE ESCAPES
|
||
|
The \fI/etc/issue\fP file 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.
|
||
|
|
||
|
.TP
|
||
|
b
|
||
|
Insert the baudrate of the current line.
|
||
|
.TP
|
||
|
d
|
||
|
Insert the current date.
|
||
|
.TP
|
||
|
s
|
||
|
Insert the system name, the name of the operating system.
|
||
|
.TP
|
||
|
l
|
||
|
Insert the name of the current tty line.
|
||
|
.TP
|
||
|
m
|
||
|
Insert the architecture identifier of the machine, eg. i486
|
||
|
.TP
|
||
|
n
|
||
|
Insert the nodename of the machine, also known as the hostname.
|
||
|
.TP
|
||
|
o
|
||
|
Insert the domainname of the machine.
|
||
|
.TP
|
||
|
r
|
||
|
Insert the release number of the OS, eg. 1.1.9.
|
||
|
.TP
|
||
|
t
|
||
|
Insert the current time.
|
||
|
.TP
|
||
|
u
|
||
|
Insert the number of current users logged in.
|
||
|
.TP
|
||
|
U
|
||
|
Insert the string "1 user" or "<n> users" where <n> is the number of current
|
||
|
users logged in.
|
||
|
.TP
|
||
|
v
|
||
|
Insert the version of the OS, eg. the build-date etc.
|
||
|
.TP
|
||
|
Example: On my system, the following \fI/etc/issue\fP file:
|
||
|
|
||
|
.na
|
||
|
.nf
|
||
|
.ti +.5
|
||
|
This is \\n.\\o (\\s \\m \\r) \\t
|
||
|
.TP
|
||
|
displays as
|
||
|
|
||
|
.ti +.5
|
||
|
This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30
|
||
|
|
||
|
.fi
|
||
|
|
||
|
.SH FILES
|
||
|
.na
|
||
|
.nf
|
||
|
/etc/utmp, the system status file (System V only).
|
||
|
/etc/issue, printed before the login prompt (System V only).
|
||
|
/dev/console, problem reports (if syslog(3) is not used).
|
||
|
/etc/inittab (Linux simpleinit(8) configuration file).
|
||
|
.SH BUGS
|
||
|
.ad
|
||
|
.fi
|
||
|
The baud-rate detection feature (the \fI-m\fP option) requires that
|
||
|
\fIagetty\fP 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 \fI-m\fP option in combination with a multiple baud
|
||
|
rate command-line argument, so that BREAK processing is enabled.
|
||
|
|
||
|
The text in the /etc/issue file and the login prompt
|
||
|
are always output with 7-bit characters and space parity.
|
||
|
|
||
|
The baud-rate detection feature (the \fI-m\fP option) requires that
|
||
|
the modem emits its status message \fIafter\fP raising the DCD line.
|
||
|
.SH DIAGNOSTICS
|
||
|
.ad
|
||
|
.fi
|
||
|
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 \fIport\fP argument does not
|
||
|
specify a terminal device; if there is no /etc/utmp entry for the
|
||
|
current process (System V only); and so on.
|
||
|
.SH AUTHOR(S)
|
||
|
.na
|
||
|
.nf
|
||
|
W.Z. Venema <wietse@wzv.win.tue.nl>
|
||
|
Eindhoven University of Technology
|
||
|
Department of Mathematics and Computer Science
|
||
|
Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
|
||
|
|
||
|
Peter Orbaek <poe@daimi.aau.dk>
|
||
|
Linux port.
|
||
|
|
||
|
.SH CREATION DATE
|
||
|
.na
|
||
|
.nf
|
||
|
Sat Nov 25 22:51:05 MET 1989
|
||
|
.SH LAST MODIFICATION
|
||
|
.na
|
||
|
.nf
|
||
|
91/09/01 23:22:00
|
||
|
.SH VERSION/RELEASE
|
||
|
.na
|
||
|
.nf
|
||
|
1.29
|