Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uugetty(1M) — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

init(1M)

uucico(1M)

stty_ld(7)

tty(7)

ct(1)

cu(1)

login(1)

stty(1-SVR3)

tip(1-BSD)

ioctl(2)

gettydefs(4)

inittab(4)



GETTY(1M)           RISC/os Reference Manual            GETTY(1M)



NAME
     getty, uugetty - set terminal type, modes, speed, and line
          discipline

SYNOPSIS
     /etc/getty [-h] [-ttimeout] line [ speed [ type [ linedisc ]
     ] ]
     /usr/lib/uucp/uugetty [-h] [-ttimeout] [-r] line [ speed [
     type [ linedisc ] ] ]
     /etc/getty -c file
     /usr/lib/uucp/uugetty -c file

DESCRIPTION
     getty and uugetty are programs invoked by init(1M).  Except
     as noted below, getty and uugetty are identical.  Each may
     be the second process in the series (init-getty-login-shell)
     that ultimately connects a user with the system.  In the
     following discussion, getty may be taken to include uugetty,
     except as noted.  Only by the super-user (a process with the
     user-ID of root), can execute getty.  Initially getty prints
     the login message field for the entry it is using from
     /etc/gettydefs.  getty reads the user's login name and
     invokes the login(1) command with the user's name as argu-
     ment.  While reading the name, getty attempts to adapt the
     system to the speed and type of terminal being used.  It
     does this by using the options and arguments specified.
     line is the name of a tty line in /dev to which getty is to
     attach itself.  getty uses this string as the name of a file
     in the /dev directory to open for reading and writing.
     Unless getty is invoked with the -h flag, getty will force a
     hangup on the line by setting the speed to zero before set-
     ting the speed to the default or specified speed.  The -t
     flag plus timeout (in seconds), specifies that getty exit if
     the open on the line succeeds and there is no additional
     standard input within the specified number of seconds.

     speed, the optional second argument, is a label to a speed
     and tty definition in the file /etc/gettydefs.  This defini-
     tion tells getty at what speed to initially run, what the
     login message should look like, what the initial tty set-
     tings are, and what speed to try next should the user indi-
     cate that the speed is inappropriate (by typing a <break>
     character).  The default speed is 300 baud.

     type, the optional third argument, is a character string
     describing to getty what type of terminal is connected to
     the line in question.  getty recognizes the following types:

          none      default
          ds40-1         Dataspeed40/1
          tektronix,tek  Tektronix
          vt61      DEC vt61



                        Printed 11/19/92                   Page 1





GETTY(1M)           RISC/os Reference Manual            GETTY(1M)



          vt100          DEC vt100
          hp45      Hewlett-Packard 45
          c100      Concept 100

     The default terminal is none; i.e., any crt or normal termi-
     nal unknown to the system.  Also, for terminal type to have
     any meaning, the virtual terminal handlers must be compiled
     into the operating system.  They are supplied in the operat-
     ing system by default.

     linedisc, the optional fourth argument, is a character
     string describing which line discipline to use in communi-
     cating with the terminal.  The following line disciplines
     are available:

     LDISC0    This is the default line discipline.  LDISC0 is
               compatible with the default System V Release 3.0
               line discipline and with the 4.3 BSD ``old'' line
               discipline.

     LDISC1    This is an extended line discipline.  LDISC1 has
               many of the features of the 4.3 BSD ``new'' line
               discipline.  (See stty(1-SVR3) for details.)

     LDISC2    This is an extended line discipline.  LDISC2 is
               fully compatible with the 4.3 BSD ``new'' line
               discipline. (Again, see stty(1-SVR3) for details.)

     When given no optional arguments, getty sets the speed of
     the interface to 300 baud and specifies that raw mode is to
     be used (awaken on every character).  Echo is suppressed,
     and either parity is allowed.  New-line characters are con-
     verted to carriage return-line feed, and tab expansion is
     performed on the standard output.  getty types the login
     message before reading the user's name a character at a
     time.  If a null character (or framing error) is received,
     it is assumed to be the result of the user pushing the
     <break> key.  This will cause getty to attempt the next
     speed in the series.  The series that getty tries is deter-
     mined by what it finds in /etc/gettydefs.

     After the user's name has been typed in, it is terminated by
     a new-line or carriage-return character.  The latter results
     in the system being set to treat carriage returns appropri-
     ately (see ioctl(2)).

     The user's name is scanned to see if it contains any lower-
     case alphabetic characters; if not, and if the name is non-
     empty, the system is told to map any future upper-case char-
     acters into the corresponding lower-case characters.





 Page 2                 Printed 11/19/92





GETTY(1M)           RISC/os Reference Manual            GETTY(1M)



     Finally, login is exec'd with the user's name as an argu-
     ment.  Additional arguments may be typed after the login
     name.  These are passed to login, which will place them in
     the environment (see login(1)).

     A check option is provided.  When getty is invoked with the
     -c option and file, it substitutes file for /etc/gettydefs ,
     scans it, and prints the results to the standard output. If
     there are any unrecognized modes or improperly constructed
     entries, it reports these. If the entries are correct, it
     prints out the values of the various flags. See ioctl(2) to
     interpret the values. Note that some values are added to the
     flags automatically.

     uugetty is identical to getty, but changes have been made to
     support using the line for uucico, cu, and ct; that is, the
     line can be used in both directions.  uugetty will allow
     users to login, but if the line is free, uucico, cu, or ct
     can use it for dialing out.  The implementation depends on
     the fact that uucico, cu, and ct create lock files when dev-
     ices are used.  When the open returns (or the first charac-
     ter is read when -r option is used), the status of the lock
     file indicates whether the line is being used by uucico, cu,
     ct, or by someone trying to login.  Note that in the -r
     case, several <carriage-return> characters may be required
     before the login message is output.  uucico trying to log in
     will have to be told by using the following login script:

          ""  \r\d\r\d\r\d\r in:--in: . . .

     where the elipsis (. . .) is whatever would normally be used
     for the login sequence.

     An entry for an intelligent modem or direct line that has a
     uugetty on each end must use the -r option.  (This causes
     uugetty to wait to read a character before it puts out the
     login message, thus preventing two uugettys from looping.)
     If there is a uugetty on one end of a direct line, there
     must be a uugetty on the other end as well.  Here is an
     /etc/inittab entry using uugetty on an intelligent modem or
     direct line:

          30:2:respawn:/usr/lib/uucp/uugetty -r -t 60 ttymh4 1200

     uugetty should be configured on a line for which the CLOCAL
     option is not the default.  Terminal lines have two device
     numbers, which differ by 128. In the default configuration,
     CLOCAL is initially set for the lower-valued device number
     and reset for the higher-numbered device number.  For exam-
     ple, /dev/tty1 (major number 0, minor number 1) has CLOCAL
     set by default, and /dev/ttym1 (major number 0, minor number
     129) has CLOCAL reset by default. (If the kopt(8) variable



                        Printed 11/19/92                   Page 3





GETTY(1M)           RISC/os Reference Manual            GETTY(1M)



     _riscos_ttys_clocal_default is changed to "disabled" (-1),
     the sense of which device number has CLOCAL set is inverted.
     In the default configuration, then, uugetty and the UUCP
     system should be configured to use the higher device numbers
     (CLOCAL reset).  For some terminal ports, such as /dev/tty1,
     the corresponding "modem" special file, such as /dev/ttym1,
     is created by default. For others, the special file must be
     created manually, with a minor number 128 greater than the
     minor number of the regular special file.

INTERNATIONAL FUNCTIONALITY
     The flag SANE may be used in both the initial and final
     flags fields of /etc/gettydefs to indicate the following
     default setting:


          c_iflag     BRKINIT ICRNL IXON
          c_oflag     OPOST ONLCR
          c_cflag     baud_rate CS8 CREAD
          c_lflag     ISIG ICANON ECHO ECHOE ECHOK

FILES
     /etc/gettydefs
     /etc/issue

SEE ALSO
     init(1M), uucico(1M), stty_ld(7), tty(7).
     ct(1), cu(1), login(1), stty(1-SVR3), tip(1-BSD) in the
     User's Reference Manual.
     ioctl(2), gettydefs(4), inittab(4) in the Programmer's
     Reference Manual.

BUGS
     While getty understands simple single character quoting con-
     ventions, it is not possible to quote certain special con-
     trol characters used by getty.  Thus, you cannot login via
     getty and type a #, @, /, !, , backspace, ^U, ^D, or & as
     part of your login name or arguments.  getty uses them to
     determine when the end of the line has been reached, which
     protocol is being used, and what the erase character is.
     They will always be interpreted as having their special
     meaning.  ct will not work when uugetty is used with an
     intelligent modem such as penril or ventel.












 Page 4                 Printed 11/19/92



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