1mgettydefs(4) mgetty_sendfax manual mgettydefs(4)
2
3
4
6 mgettydefs - speed and terminal settings used by mgetty
7
9 The /etc/gettydefs file contains information used by mgetty(1) to set
10 up the speed and terminal settings for a line. It also supplies infor‐
11 mation on what the login prompt should look like.
12
13 Many versions of UNIX have a version of getty(1) that also reads
14 /etc/gettydefs. Both mgetty and getty expect similar formats in
15 /etc/gettydefs except that, when used by mgetty, extended functionality
16 is available. Even so, the additional functions are simply ignored by
17 standard getty, so they can co-exist using the same file. Note, how‐
18 ever, that mgetty can be compiled to use a file different from
19 /etc/gettydefs if your getty gets upset about the extensions. This
20 manual page documents /etc/gettydefs and describes the extended func‐
21 tionality available when used by mgetty(1). This document will refer
22 to getty(1) except where mgetty's behaviour is different.
23
24 Each entry in /etc/gettydefs has the following format:
25
26 label# initial-flags # final-flags # login-prompt #next-label
27
28 Each entry is followed by a blank line. The login prompt field can
29 contain quoted characters which will be converted to other values. The
30 sequences and their substitutions are:
31
32 \n newline
33
34 \r carriage return
35
36 \g beep
37
38 \b backspace
39
40 \v vertical tab (VT)
41
42 \f formfeed
43
44 \t tab
45
46 \L portname
47
48 \C time in ctime(3) format.
49
50 \N number of users currently logged in
51
52 \U number of users currently logged in
53
54 \D date in DD/MM format
55
56 \T time in hh:mm:ss format
57
58 \I modem CONNECT attributes
59
60 \sequence where "sequence" is a valid strtol format, such as:
61 \0nnn (octal), \0xnnn (hex), or \nnn (decimal).
62
63 Note that standard getty usually only supports \b, \r and \n.
64
65 The various fields are:
66
67 label This is the string against which getty tries to match
68 its second argument. It is often the speed, such as
69 1200, at which the terminal is supposed to run, but it
70 need not be (see below).
71
72 initial-flags These flags are the initial ioctl(2) settings to which
73 the terminal is to be set if a terminal type is not
74 specified to getty. The flags that getty understands
75 are the ones listed in termio(7)). mgetty is usually
76 compiled for termios(7) and often has a more complete
77 set than getty.
78
79 Normally only the speed flag is required in the
80 initial-flags. getty automatically sets the terminal to
81 raw input mode and takes care of the other flags. If
82 the "-s" option is used with mgetty(1) the speed setting
83 is ignored. The initial-flag settings remain in effect
84 until getty executes login(1).
85
86 final-flags These flags take the same values as the initial-flags
87 and are set just before getty executes login. The speed
88 flag is again required, except with mgetty if the -s
89 flag was supplied. Two other commonly specified final-
90 flags are TAB3, so that tabs are sent to the terminal as
91 spaces, and HUPCL, so that the line is hung up on the
92 final close.
93
94 login-prompt This entire field is printed as the login-prompt.
95 Unlike the above fields where white space (a space, tab
96 or new-line) is ignored, they are included in the login-
97 prompt field. This field is ignored if the "-p" option
98 has been specified to mgetty(1).
99
100 next-label specifies the label to use if the user user types a
101 <break> character, or getty detects a reception error.
102 Getty searches for the entry with next-label as its
103 label field and set up the terminal for those settings.
104 Usually, a series of speeds are linked together in this
105 fashion, into a closed set; for instance, 2400 linked to
106 1200, which in turn is linked to 300, which finally is
107 linked to 2400. next-label is ignored with mgetty(1).
108
109 Several additional composite settings are available for initial-flags
110 and final-flags. The following composite flags are supported by mgetty
111 and are usually supported by getty:
112
113 SANE equivalent to ``stty sane''. (BRKINT, IGNPAR,
114 ISTRIP, ICRNL, IXON, OPOST, CS8, CREAD, ISIG,
115 ICANON, ECHO, ECHOK)
116
117 ODDP Odd parity (CS7, PARENB, PARODD)
118
119 PARITY,EVENP even parity (CS7, PARENB)
120
121 -ODDP,-PARITY,-EVENP
122 no parity (resets PARENB, PARODD, and sets CS8)
123
124 RAW raw I/O (no canonical processing) (turns off OPOST,
125 ICANON)
126
127 -RAW,COOKED enable canonical processing (turns on OPOST,
128 ICANON)
129
130 NL Ignore newlines. (ICRNL, ONLCR)
131
132 -NL Respect newlines (turns INLCR, IGNCR, ICRNL, ONLCR,
133 OCRNL, ONLRET off)
134
135 LCASE Ignore case - treat all as lowercase. (IUCLC,
136 OLCUC, XCASE) Is set if mgetty believes login is
137 entirely uppercase.
138
139 -LCASE Respect case (turns off IUCLC, OLCUC and XCASE)
140
141 TABS output tabs as tabs
142
143 -TABS,TAB3 output tabs as spaces
144
145 EK Sets VERASE to "#" and VKILL to CKILL respectively.
146 (note that while many gettys default VERASE to "#".
147 mgetty defaults VERASE to backspace.)
148
149 Additionally, mgetty (but not getty) can set any of the control charac‐
150 ters listed in the c_cc termio(termios) structure by the use of two
151 tokens:
152
153 <character name> <value>
154
155 Eg:
156
157 VERASE ^h
158
159 The value can be set as ``^<character>'', ``\nnn'' or ``\<character>''
160 (normal UNIX \ escapes).
161
162 See the termio(7) or termios(7) manual pages to a list of which ``V''
163 variables can be changed. Note that many of these can be changed in
164 the c_cc array, but won't have any effect.
165
166 If getty is called without a second argument, the first entry of
167 /etc/gettydefs is used by getty, thus making the first entry of
168 /etc/gettydefs the default entry. It is also used if getty cannot find
169 the specified label. Mgetty use a default label of ``n'', but this can
170 be changed in the configuration. If /etc/gettydefs itself is missing,
171 there is one entry built into the command which brings up a terminal at
172 300 (configuration parameter in mgetty) baud.
173
174 It is strongly recommended that after making or modifying /etc/getty‐
175 defs, it be run through getty with the check option to be sure there
176 are no errors.
177
179 The following two lines show an example of 300/1200 baud toggle, which
180 is useful for dial-up ports:
181
182 1200# B1200 HUPCL # B1200 SANE IXANY TAB3 #login: #300
183 300# B300 HUPCL # B300 SANE IXANY TAB3 #login: #1200
184
185 The following line shows a typical 9600 baud entry for a hard-wired
186 connection (not currently supported for mgetty):
187
188 9600# B9600 # B9600 SANE IXANY IXANY ECHOE TAB3 #login: #9600
189
190 The following line is a typical smart-modem setup, suitable for mgetty:
191
192 19200mg#
193 B19200 #
194 B19200 SANE VERASE \b VINTR \003 HUPCL #
195 \n\D \T \N Users @!login: #19200mg
196
198 /etc/gettydefs
199
201 mgetty(8), getty(8), login(1), ioctl(2), termio(7), termios(7).
202
203
204
205greenie 4 Dec 93 mgettydefs(4)