version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
mgettydefs |
|
|
2 |
!!!mgettydefs |
|
|
3 |
NAME |
|
|
4 |
DESCRIPTION |
|
|
5 |
EXAMPLES |
|
|
6 |
FILES |
|
|
7 |
SEE ALSO |
|
|
8 |
---- |
|
|
9 |
!!NAME |
|
|
10 |
|
|
|
11 |
|
|
|
12 |
mgettydefs - speed and terminal settings used by mgetty |
|
|
13 |
!!DESCRIPTION |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
The __/etc/gettydefs__ file contains information used by |
|
|
17 |
mgetty(1) to set up the speed and terminal settings |
|
|
18 |
for a line. It also supplies information on what the |
|
|
19 |
''login'' prompt should look like. |
|
|
20 |
|
|
|
21 |
|
|
|
22 |
Many versions of UNIX have a version of getty(1) that |
|
|
23 |
also reads __/etc/gettydefs__. Both ''mgetty'' and |
|
|
24 |
''getty'' expect similar formats in __/etc/gettydefs__ |
|
|
25 |
except that, when used by ''mgetty'', extended |
|
|
26 |
functionality is available. Even so, the additional |
|
|
27 |
functions are simply ignored by standard ''getty'', so |
|
|
28 |
they can co-exist using the same file. Note, however, that |
|
|
29 |
''mgetty'' can be compiled to use a file different from |
|
|
30 |
__/etc/gettydefs__ if your ''getty'' gets upset about |
|
|
31 |
the extensions. This manual page documents |
|
|
32 |
__/etc/gettydefs__ and describes the extended |
|
|
33 |
functionality available when used by mgetty(1). This |
|
|
34 |
document will refer to getty(1) except where |
|
|
35 |
''mgetty'''s behaviour is different. |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
Each entry in __/etc/gettydefs__ has the following |
|
|
39 |
format: |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
label# initial-flags # final-flags # login-prompt |
|
|
43 |
#next-label |
|
|
44 |
|
|
|
45 |
|
|
|
46 |
Each entry is followed by a blank line. The login prompt |
|
|
47 |
field can contain quoted characters which will be converted |
|
|
48 |
to other values. The sequences and their substitutions |
|
|
49 |
are: |
|
|
50 |
|
|
|
51 |
|
|
|
52 |
__n__ newline |
|
|
53 |
|
|
|
54 |
|
|
|
55 |
__r__ carriage return |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
__g__ beep |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
__b__ backspace |
|
|
62 |
|
|
|
63 |
|
|
|
64 |
__v__ vertical tab (VT) |
|
|
65 |
|
|
|
66 |
|
|
|
67 |
__f__ formfeed |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
__t__ tab |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
__L__ portname |
|
|
74 |
|
|
|
75 |
|
|
|
76 |
__C__ time in ctime(3) format. |
|
|
77 |
|
|
|
78 |
|
|
|
79 |
__N__ number of users currently logged in |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
__U__ number of users currently logged in |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
__D__ date in DD/MM format |
|
|
86 |
|
|
|
87 |
|
|
|
88 |
__T__ time in hh:mm:ss format |
|
|
89 |
|
|
|
90 |
|
|
|
91 |
__I__ modem CONNECT attributes |
|
|
92 |
|
|
|
93 |
|
|
|
94 |
__sequence__ |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
where |
|
|
98 |
|
|
|
99 |
|
|
|
100 |
Note that standard ''getty'' usually only supports b, r |
|
|
101 |
and n. |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
The various fields are: |
|
|
105 |
|
|
|
106 |
|
|
|
107 |
''label'' This is the string against which ''getty'' |
|
|
108 |
tries to match its second argument. It is often the speed, |
|
|
109 |
such as __1200__, at which the terminal is supposed to |
|
|
110 |
run, but it need not be (see below). |
|
|
111 |
|
|
|
112 |
|
|
|
113 |
''initial-flags'' |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
These flags are the initial ioctl(2) settings to |
|
|
117 |
which the terminal is to be set if a terminal type is not |
|
|
118 |
specified to ''getty''. The flags that ''getty'' |
|
|
119 |
understands are the ones listed in termio(7)). |
|
|
120 |
''mgetty'' is usually compiled for termios(7) and |
|
|
121 |
often has a more complete set than |
|
|
122 |
''getty''. |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
Normally only the speed flag is required in the |
|
|
126 |
|
|
|
127 |
|
|
|
128 |
''initial-flags''. ''getty'' automatically sets the |
|
|
129 |
terminal to raw input mode and takes care of the other |
|
|
130 |
flags. If the |
|
|
131 |
mgetty(1) the speed setting is ignored. The |
|
|
132 |
''initial-flag'' settings remain in effect until |
|
|
133 |
''getty'' executes login(1). |
|
|
134 |
|
|
|
135 |
|
|
|
136 |
''final-flags'' |
|
|
137 |
|
|
|
138 |
|
|
|
139 |
These flags take the same values as the ''initial-flags'' |
|
|
140 |
and are set just before ''getty'' executes ''login''. |
|
|
141 |
The speed flag is again required, except with ''mgetty'' |
|
|
142 |
if the -s flag was supplied. Two other commonly specified |
|
|
143 |
''final-flags'' are |
|
|
144 |
__TAB3__, so that tabs are |
|
|
145 |
sent to the terminal as spaces, and |
|
|
146 |
__HUPCL__, so that the line |
|
|
147 |
is hung up on the final close. |
|
|
148 |
|
|
|
149 |
|
|
|
150 |
''login-prompt'' |
|
|
151 |
|
|
|
152 |
|
|
|
153 |
This entire field is printed as the ''login-prompt''. |
|
|
154 |
Unlike the above fields where white space (a space, tab or |
|
|
155 |
new-line) is ignored, they are included in the |
|
|
156 |
''login-prompt'' field. This field is ignored if the |
|
|
157 |
mgetty(1). |
|
|
158 |
|
|
|
159 |
|
|
|
160 |
''next-label'' |
|
|
161 |
|
|
|
162 |
|
|
|
163 |
specifies the label to use if the user user types a |
|
|
164 |
'''' character, or ''getty'' detects a |
|
|
165 |
reception error. ''Getty'' searches for the entry with |
|
|
166 |
''next-label'' as its ''label'' field and set up the |
|
|
167 |
terminal for those settings. Usually, a series of speeds are |
|
|
168 |
linked together in this fashion, into a closed set; for |
|
|
169 |
instance, __2400__ linked to __1200__, which in turn |
|
|
170 |
is linked to __300__, which finally is linked to |
|
|
171 |
__2400__. ''next-label'' is ignored with |
|
|
172 |
mgetty(1). |
|
|
173 |
|
|
|
174 |
|
|
|
175 |
Several additional composite settings are available for |
|
|
176 |
''initial-flags'' and ''final-flags''. The following |
|
|
177 |
composite flags are supported by ''mgetty'' and are |
|
|
178 |
usually supported by ''getty'': |
|
|
179 |
|
|
|
180 |
|
|
|
181 |
__SANE__ equivalent to ``stty sane''. (BRKINT, IGNPAR, |
|
|
182 |
ISTRIP, ICRNL, IXON, OPOST, CS8, CREAD, ISIG, ICANON, ECHO, |
|
|
183 |
ECHOK) |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
__ODDP__ Odd parity (CS7, PARENB, PARODD) |
|
|
187 |
|
|
|
188 |
|
|
|
189 |
__PARITY__,__EVENP__ even parity (CS7, |
|
|
190 |
PARENB) |
|
|
191 |
|
|
|
192 |
|
|
|
193 |
__-ODDP__,__-PARITY__,__-EVENP__ |
|
|
194 |
|
|
|
195 |
|
|
|
196 |
no parity (resets PARENB, PARODD, and sets CS8) |
|
|
197 |
|
|
|
198 |
|
|
|
199 |
__RAW__ raw I/O (no canonical processing) (turns off |
|
|
200 |
OPOST, ICANON) |
|
|
201 |
|
|
|
202 |
|
|
|
203 |
__-RAW__,__COOKED__ enable canonical processing (turns |
|
|
204 |
on OPOST, ICANON) |
|
|
205 |
|
|
|
206 |
|
|
|
207 |
__NL__ Ignore newlines. (ICRNL, ONLCR) |
|
|
208 |
|
|
|
209 |
|
|
|
210 |
__-NL__ Respect newlines (turns INLCR, IGNCR, ICRNL, |
|
|
211 |
ONLCR, OCRNL, ONLRET off) |
|
|
212 |
|
|
|
213 |
|
|
|
214 |
__LCASE__ Ignore case - treat all as lowercase. (IUCLC, |
|
|
215 |
OLCUC, XCASE) Is set if mgetty believes login is entirely |
|
|
216 |
uppercase. |
|
|
217 |
|
|
|
218 |
|
|
|
219 |
__-LCASE__ Repect case (turns off IUCLC, OLCUC and |
|
|
220 |
XCASE) |
|
|
221 |
|
|
|
222 |
|
|
|
223 |
__TABS__ output tabs as tabs |
|
|
224 |
|
|
|
225 |
|
|
|
226 |
__-TABS__,__TAB3__ output tabs as spaces |
|
|
227 |
|
|
|
228 |
|
|
|
229 |
__EK__ Sets VERASE to |
|
|
230 |
__mgetty'' defaults VERASE to |
|
|
231 |
backspace.) |
|
|
232 |
|
|
|
233 |
|
|
|
234 |
Additionally, ''mgetty'' (but not ''getty'') can set |
|
|
235 |
any of the control characters listed in the __c_cc__ |
|
|
236 |
termio(termios) structure by the use of two |
|
|
237 |
tokens: |
|
|
238 |
|
|
|
239 |
|
|
|
240 |
|
|
|
241 |
|
|
|
242 |
Eg: |
|
|
243 |
|
|
|
244 |
|
|
|
245 |
VERASE ^h |
|
|
246 |
|
|
|
247 |
|
|
|
248 |
The value can be set as ``^ |
|
|
249 |
|
|
|
250 |
|
|
|
251 |
See the termio(7) or termios(7) manual pages |
|
|
252 |
to a list of which ``V'' variables can be changed. Note that |
|
|
253 |
many of these can be changed in the c_cc array, but won't |
|
|
254 |
have any effect. |
|
|
255 |
|
|
|
256 |
|
|
|
257 |
If ''getty'' is called without a second argument, the |
|
|
258 |
first entry of __/etc/gettydefs__ is used by |
|
|
259 |
''getty'', thus making the first entry of |
|
|
260 |
__/etc/gettydefs__ the default entry. It is also used if |
|
|
261 |
''getty'' cannot find the specified ''label''. |
|
|
262 |
''Mgetty'' use a default label of ``n'', but this can be |
|
|
263 |
changed in the configuration. If __/etc/gettydefs__ |
|
|
264 |
itself is missing, there is one entry built into the command |
|
|
265 |
which brings up a terminal at __300__ (configuration |
|
|
266 |
parameter in ''mgetty'') baud. |
|
|
267 |
|
|
|
268 |
|
|
|
269 |
It is strongly recommended that after making or modifying |
|
|
270 |
__/etc/gettydefs__, it be run through ''getty'' with |
|
|
271 |
the check option to be sure there are no |
|
|
272 |
errors. |
|
|
273 |
!!EXAMPLES |
|
|
274 |
|
|
|
275 |
|
|
|
276 |
The following two lines show an example of 300/1200 baud |
|
|
277 |
toggle, which is useful for dial-up ports: |
|
|
278 |
|
|
|
279 |
|
|
|
280 |
1200# B1200 HUPCL # B1200 SANE IXANY TAB3 #login: #300 |
|
|
281 |
300# B300 HUPCL # B300 SANE IXANY TAB3 #login: |
|
|
282 |
#1200 |
|
|
283 |
|
|
|
284 |
|
|
|
285 |
The following line shows a typical 9600 baud entry for a |
|
|
286 |
hard-wired connection (not currently supported for |
|
|
287 |
''mgetty''): |
|
|
288 |
|
|
|
289 |
|
|
|
290 |
9600# B9600 # B9600 SANE IXANY IXANY ECHOE TAB3 #login: |
|
|
291 |
#9600 |
|
|
292 |
|
|
|
293 |
|
|
|
294 |
The following line is a typical smart-modem setup, suitable |
|
|
295 |
for ''mgetty'': |
|
|
296 |
|
|
|
297 |
|
|
|
298 |
19200mg# |
|
|
299 |
B19200 # |
|
|
300 |
B19200 SANE VERASE b VINTR 003 HUPCL # |
|
|
301 |
nD T N Users @!login: #19200mg |
|
|
302 |
!!FILES |
|
|
303 |
|
|
|
304 |
|
|
|
305 |
/etc/gettydefs |
|
|
306 |
!!SEE ALSO |
|
|
307 |
|
|
|
308 |
|
|
|
309 |
mgetty(8), getty(8), login(1), ioctl(2), termio(7), |
|
|
310 |
termios(7). |
|
|
311 |
---- |