Merge from vendor branch LUKEMFTP:
[dragonfly.git] / libexec / getty / getty.8
1 .\" Copyright (c) 1980, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     from: @(#)getty.8       8.1 (Berkeley) 6/4/93
33 .\" $FreeBSD: src/libexec/getty/getty.8,v 1.10.2.3 2001/08/16 10:44:15 ru Exp $
34 .\" $DragonFly: src/libexec/getty/getty.8,v 1.3 2004/12/26 12:37:08 swildner Exp $
35 .\" "
36 .Dd June 4, 1993
37 .Dt GETTY 8
38 .Os
39 .Sh NAME
40 .Nm getty
41 .Nd set terminal mode
42 .Sh SYNOPSIS
43 .Nm
44 .Oo
45 .Ar type
46 .Op Ar tty
47 .Oc
48 .Sh DESCRIPTION
49 The
50 .Nm
51 program
52 is called by
53 .Xr init 8
54 to open and initialize the tty line, read a login name, and invoke
55 .Xr login 1 .
56 .Pp
57 The argument
58 .Ar tty
59 is the special device file in
60 .Pa /dev
61 to open for the terminal (for example, ``ttyh0'').
62 If there is no argument or the argument is
63 .Sq Fl ,
64 the tty line is assumed to be open as file descriptor 0.
65 .Pp
66 The
67 .Ar type
68 argument can be used to make
69 .Nm
70 treat the terminal line specially.
71 This argument is used as an index into the
72 .Xr gettytab 5
73 database, to determine the characteristics of the line.
74 If there is no argument, or there is no such table, the
75 .Em default
76 table is used.
77 If there is no
78 .Pa /etc/gettytab
79 a set of system defaults is used.
80 If indicated by the table located,
81 .Nm
82 will clear the terminal screen,
83 print a banner heading,
84 and prompt for a login name.
85 Usually either the banner or the login prompt will include
86 the system hostname.
87 .Pp
88 Most of the default actions of
89 .Nm
90 can be circumvented, or modified, by a suitable
91 .Pa gettytab
92 table.
93 .Pp
94 The
95 .Nm
96 program
97 can be set to timeout after some interval,
98 which will cause dial up lines to hang up
99 if the login name is not entered reasonably quickly.
100 .Sh DIAGNOSTICS
101 .Bl -diag
102 .It "ttyxx: No such device or address."
103 .It "ttyxx: No such file or address."
104 .Pp
105 A terminal which is turned
106 on in the
107 .Pa ttys
108 file cannot be opened, likely because the requisite
109 lines are either not configured into the system, the associated device
110 was not attached during boot-time system configuration,
111 or the special file in
112 .Pa /dev
113 does not exist.
114 .El
115 .Sh FILES
116 .Bl -tag -width /etc/gettytab -compact
117 .It Pa /etc/gettytab
118 .It Pa /etc/ttys
119 .El
120 .Sh SEE ALSO
121 .Xr login 1 ,
122 .Xr ioctl 2 ,
123 .Xr tty 4 ,
124 .Xr gettytab 5 ,
125 .Xr ttys 5 ,
126 .Xr init 8
127 .Sh HISTORY
128 A
129 .Nm
130 program appeared in
131 .At v6 .