sttydefs(1M) DG/UX R4.11 sttydefs(1M)
NAME
sttydefs - maintain line and hunt settings for TTY ports
SYNOPSIS
/usr/sbin/sttydefs -a ttylabel [-b] [ -n nextlabel ]
[ -i initial-flags ] [ -f final-flags ]
/usr/sbin/sttydefs -l [ ttylabel ]
/usr/sbin/sttydefs -r ttylabel
where:
ttylabel is the name of a record in /etc/ttydefs
nextlabel is the next record of a hunt sequence
initial-flags is the list of stty(1) flags used for login
final-flags is the list of stty(1) flags used after login
DESCRIPTION
sttydefs is an administrative command that maintains the line
settings and hunt sequences for the system's TTY ports, by making
entries in and deleting entries from the /etc/ttydefs file. It is
used as an adjunct to the Service Access Facility (see sac(1M) and
ttymon(1M)).
sttydefs with a -a or -r option may be successfully invoked only by a
privileged user. sttydefs with the -l option may be invoked by any
user on the system.
Options are:
-l Display on the standard output the record from /etc/ttydefs
whose TTY label matches the specified ttylabel. If no
ttylabel is specified, display the entire contents of
/etc/ttydefs. sttydefs will verify that each entry it
displays is correct and that each entry's nextlabel field
references an existing ttylabel. Any errors found during the
verification process will produce self-explanatory messages on
the standard output.
-a ttylabel
Add a record to the /etc/ttydefs file, using ttylabel as its
label.
-r ttylabel
Remove any record in the /etc/ttydefs file that has ttylabel
as its label.
-b Specify that the "autobaud" feature should be enabled.
Autobaud allows the system to set the line speed of a given
TTY port by the line speed of the device connected to the port
without the user's intervention.
-n nextlabel
Specify the value to be used in the nextlabel field in
/etc/ttydefs. This value identifies the next record in a
"hunt sequence" to be tried if a user indicates that the line
speed is wrong (by pressing the BREAK key) while logging in.
If this option is not specified, sttydefs will set nextlabel
equal to ttylabel.
-i initial-flags
Specify the value to be used in the initial-flags field in
/etc/ttydefs. initial-flags must be in a format recognized by
the stty(1) command. These termio(7) flags are used by
ttymon(1M) when searching for the correct baud rate. They are
set prior to writing the prompt. If this option is not
specified, sttydefs will set initial-flags equal to the
termio(7) flag 9600.
-f final-flags
Specify the value to be used in the final-flags field in
/etc/ttydefs. final-flags must be in a format recognized by
the stty(1) command. final-flags is the list of termio(7)
settings used by ttymon(1M) after receiving a successful
connection request and immediately before invoking the service
on the port. If this option is not specified, sttydefs will
set final-flags equal to the termio(7) flags 9600 and sane.
The -l, -a, and -r options are mutually exclusive. The -b, -n, -i,
and -f options can be used only in conjunction with the -a option.
EXAMPLES
sttydefs -l
List all the entries in the /etc/ttydefs file and print an error
message for each invalid entry that is detected.
sttydefs -l 9600
Request information for a single label in the /etc/ttydefs file. The
output of this command would look like the following:
---------------------------------------------------
9600:9600 hupcl:9600 sane ixany tab3 erase ^h::4800
---------------------------------------------------
ttylabel: 9600
initial flags: 9600 hupcl
final flags: 9600 sane ixany tab3 erase ^h
autobaud: no
nextlabel: 4800
sttydefs -a 1200 -n 2400 -i 1200 -f "1200 sane"
sttydefs -a 2400 -n 4800 -i 2400 -f "2400 sane"
sttydefs -a 4800 -n 9600 -i 4800 -f "4800 sane"
sttydefs -a 9600 -n 1200 -i 9600 -f "9600 sane"
Add the labels 1200, 2400, 4800, and 9600, putting them in a circular
hunt list.
FILES
/etc/ttydefs TTY settings file
/etc/.ttydefs temporary file
DIAGNOSTICS
Exit Codes
If successful, sttydefs will exit with a status of 0. If an error
occurs during its operation, sttydefs will print an error message to
standard error and exit with a status of 1. An error in the command
line will cause sttydefs to print a usage message to standard error
and exit with a status of 2.
Error Messages
User not privileged for operation.
An attempt was made by someone other than a user with appropriate
privilege to add (-a) or remove (-r) an entry from /etc/ttydefs. For
systems supporting the DG/UX Capability Option, appropriate privilege
is defined as having one or more specific capabilities enabled in the
effective capability set of the user. See cap_defaults(5) for the
default capabilities for this command.
On systems without the DG/UX Capability Option, appropriate privilege
means that your process has an effective UID of root. See the
appropriate_privilege(5) man page for more information.
Version number is incorrect or missing.
The /etc/ttydefs file is corrupt, does not contain a "VERSION=" line,
or specifies an unrecognized version ID.
Tempfile busy; try again later.
Someone else is currently using sttydefs to update /etc/ttydefs.
Otherwise, an invocation of sttydefs crashed, or the system crashed
while sttydefs was running, leaving behind an extraneous
/etc/.ttydefs temporary file.
Ttylabel ttylabel not found
An attempt to list (-l) the record ttylabel failed because that entry
does not exist in /etc/ttydefs.
Ttylabel ttylabel already exists.
An attempt to add (-a) the record ttylabel failed because that entry
already exists in /etc/ttydefs.
Ttylabel ttylabel does not exist.
An attempt to remove (-r) the record ttylabel failed because that
entry does not exist in /etc/ttydefs.
Other error messages should be self-explanatory, reporting either
usage errors or failure of a system call or library function.
SEE ALSO
sac(1M), stty(1), ttymon(1M), appropriate_privilege(5),
cap_defaults(5), termio(7).
System Administrator's Guide, ``Terminal Line Settings.''
Licensed material--property of copyright holder(s)