Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getty(1M) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

init(1M)

setport(1M)

login(1)

ct(1C)

gettydefs(4)

inittab(4)

tty(7)




getty(1M) getty(1M)
NAME apm_getty, getty - set the initial communication modes, such as speed and line discipline, for the purpose of logging users in to A/UX through serial lines SYNOPSIS getty [-C string] [-d] [-h] [-i] [-q] [-t timeout] line [gettydefs-label [type [linedisc]]] getty -c file apm_getty [-h] [-t timeout] line [gettydefs-label [type [linedisc]]] ARGUMENTS -C string Prevents getty from writing the login banner until it reads the string specified by string, followed by a return character. When getty reads the value specified by string, any number of characters can precede the return character. For example, if the value of string is CONNECT and if getty reads CONNECT 1200, getty will write the login banner. This option is useful for modems that have a verbose mode in which they indicate the status by returning a string, such as RING when the phone number is ringing. If you do not use the -C option and the modem is in verbose mode, getty continually interprets the modem's status strings as a login name or a password, thereby degrading system performance. -c file Causes getty to scan the named file just as it would scan /etc/gettydefs and then to print a report showing how it interpreted the contents of the file. The getty command reports any unrecognized modes or improperly constructed entries. If the entries are correct, getty reports the values it was able to determine for each entry in the file. -d Enables debugging. The debugging output is written in /tmp/getty.debug_log. gettydefs-label Specifies a terminal type and line discipline in terms of one of the labels from the first field of /etc/gettydefs. Two parameters can also be given locally to override the terminal type setting or the line discipline setting found in /etc/gettydefs, or both. (See the descriptions of the type and linedisc options, later in this list.) January 1992 1



getty(1M) getty(1M)
-h Prevents getty from forcing a hangup on the communications line. Normally, getty attempts to terminate any other communications taking place over the line by setting the speed to 0 for a time before setting the speed to the default or specified speed. This option is ignored by the A/UX Release 3.X (and later) versions of getty. -i Prevents getty from checking for a lock file before issuing the login prompt and from creating its own lock file. The ct command uses this option when it runs getty on the remote terminal. See ``Interaction with Other Communications Programs'' in the ``Description'' section for details. line Specifies the name of the device file in /dev that corresponds to a communications port. The getty program opens this port for reading and writing as part of the login connection sequence. linedisc Specifies a line discipline. Use LDISC0 because it is the only line discipline the kernel currently supports. If you add new line disciplines to the kernel, you can configure getty to use them by passing getty the newly supported value for linedisc. -q Prevents getty from writing the login banner to the line until getty receives some input. This option is useful for direct connections. -t timeout Causes getty to abandon attempts to read data from the line after it displays the login prompt if a user fails to enter any information during the specified number of seconds. Replace timeout with the maximum amount of time in seconds that getty should wait for a user to enter an account name. If the timeout interval expires, a new login prompt is issued. type Specifies the terminal type. Use one of the following values: none (Default) vt61 DEC vt61 vt100 DEC vt100 c100 Concept 100 DESCRIPTION getty is one of a series of programs that connects a user with the A/UX system. After being invoked by init, getty 2 January 1992



getty(1M) getty(1M)
subsequently invokes login. The getty program sends a login message to a terminal, using the communications parameters mapped through the file /etc/gettydefs. After getty reads the account name, it invokes the login command with the account name as an argument. While reading the account name, getty attempts to adapt the system to the speed and type of terminal being used, as necessary. (See ``Dynamically Selectable Settings'' later in the ``Description'' section.) If additional arguments are received after the account name and an intervening space, those additional arguments are also supplied to login, which places them in the environment (see login(1M)). When none of the optional arguments is specified, a default speed of 300 baud is used and the following communications settings are established: raw mode (awaken on every character); no echoing; either even or odd parity; transformation of a newline character into a return and a line feed; and tab expansion. apm_getty provides functionality beyond normal getty for use with an Apple Personal Modem. Before apm_getty turns control over to getty, it sends the control sequence to select auto-answer mode. To switch back to a dial-out line, change the line containing apm_getty in /etc/inittab to off instead of respawn. To activate these changes, use init q as described in init(1M). Character Processing The A/UX Release 3.0 version of getty ignores XON and XOFF characters. If, in response to the login prompt, getty receives a login name of which 25 per cent of the characters are non- printable, getty exits. This behavior is useful when working with a modem that doesn't hang up the telephone line when Data Terminal Ready is lowered. Instead, such modems may send non-printable characters which getty would otherwise interpret as a login name. Dynamically Selectable Settings The getty program reads input one character at a time, analyzing the nature of the communications settings along the way. It assumes that any null character (or framing error) is a break character that presumably is the result of the user's pressing the break key. In response, getty attempts to communicate by using the next baud rate in a series of baud rates. A speed series is specified for each entry in /etc/gettydefs. In addition, getty ignores any additional break characters for 1.5 seconds. This prevents January 1992 3



getty(1M) getty(1M)
getty from needlessly cycling through the baud rates when it receives spurious break characters. Besides interpreting the standard A/UX system erase and kill characters (DELETE and CONTROL-U), getty also understands \b as an erase sequence. The getty program sets the standard erase character or kill character to match the A/UX characters. A user indicates the end of the account name by entering a newline or return character. After a newline is received, the account name is scanned to see if it contains any lowercase alphabetic characters; if not, and if the name is nonempty, the system maps subsequent uppercase characters into the corresponding lowercase characters. Interaction with Other Communications Programs The programs that use serial lines (ct, cu, getty, kermit, tip, and uucico) prevent collisions over serial lines by honoring a lock file convention in the directory /usr/spool/locks. This lock file convention allows you to set up a serial port for both dial-in and dial-out at the same time. When getty is running on a serial port, it waits until it receives input (indicating that someone is trying to dial in) before making its lock file. Because getty waits to make its own lock file, ct, cu, and uucico can use the serial port to dial out even while getty is running on it. When ct, cu, or uucico need to use the serial port, each program makes its lock file and proceeds. When getty detects the first incoming character, it tries to make its own lock file, but finds that ct, cu, or uucico has a lock file. In response, getty alternately sleeps for 10 seconds and checks the lock file until the lock file is gone (because ct, cu, or uucico unlocked it) or becomes invalid. At this point, getty again waits to make its lock file until there is an incoming character. The -i option, which is used only by the ct command when it invokes getty, prevents getty from finding the lock file already created by ct and from trying to create its own lock file, which would clash with the one already created by ct. Terminal Handling The default terminal is none; that is, any CRT or normal terminal unknown to the system. For the terminal type to have any meaning, the virtual terminal handlers must be compiled into the operating system. They are available, but not compiled, in the default condition. The optional fourth argument, linedisc, is a character string describing which line discipline to use in communicating with the terminal. 4 January 1992



getty(1M) getty(1M)
The hooks for line disciplines are available in the operating system, but only one line discipline, LDISCO, is presently available. LIMITATIONS Although getty understands escape characters such as the backslash, it is not possible to escape the control characters that getty uses. FILES /etc/getty Executable file /etc/gettydefs Database file for common communications settings /etc/issue File displayed by getty as part of the login: prompt /usr/spool/locks/* Directory of lock files SEE ALSO init(1M), setport(1M), login(1), ct(1C) in A/UX Command Reference gettydefs(4), inittab(4), tty(7) in A/UX Programmer's Reference January 1992 5

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026