'\" te .\" Copyright 1989 AT&T Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH sttydefs 1M "14 Sep 1992" "SunOS 5.11" "System Administration Commands" .SH NAME sttydefs \- maintain line settings and hunt sequences for TTY ports .SH SYNOPSIS .LP .nf \fB/usr/sbin/sttydefs\fR \fB-a\fR \fIttylabel\fR [\fB-b\fR] [\fB-f\fR \fIfinal-flags\fR] [\fB-i\fR \fIinitial-flags\fR] [\fB-n\fR \fInextlabel\fR] .fi .LP .nf \fB/usr/sbin/sttydefs\fR \fB-l\fR [\fIttylabel\fR] .fi .LP .nf \fB/usr/sbin/sttydefs\fR \fB-r\fR \fIttylabel\fR .fi .SH DESCRIPTION .sp .LP \fBsttydefs\fR 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 \fB/etc/ttydefs\fR file. .sp .LP \fBsttydefs\fR with a \fB-a\fR or \fB-r\fR option may be invoked only by the super-user. \fBsttydefs\fR with \fB-l\fR may be invoked by any user on the system. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-a\fR \fIttylabel\fR\fR .ad .RS 20n .rt Add a record to the \fBttydefs\fR file, using \fIttylabel\fR as its label. The following describes the effect of the \fB-b\fR, \fB-n\fR, \fB-i\fR, or \fB-f\fR options when used in conjunction with the \fB-a\fR option: .RE .sp .ne 2 .mk .na \fB\fB-b\fR\fR .ad .RS 20n .rt Enable autobaud. Autobaud allows the system to set the line speed of a given TTY port to the line speed of the device connected to the port without the user's intervention. .RE .sp .ne 2 .mk .na \fB\fB-f\fR \fIfinal-flags\fR\fR .ad .RS 20n .rt Specify the value to be used in the \fIfinal-flags\fR field in \fB/etc/ttydefs\fR. \fIfinal-flags\fR must be in a format recognized by the \fBstty\fR command. \fIfinal-flags\fR are the \fBtermio\fR(7I) settings used by \fBttymon\fR after receiving a successful connection request and immediately before invoking the service on the port. If this option is not specified, \fBsttydefs\fR will set \fIfinal-flags\fR equal to the \fBtermio\fR(7I) flags \fB9600\fR and \fBsane\fR. .RE .sp .ne 2 .mk .na \fB\fB-i\fR \fIinitial-flags\fR\fR .ad .RS 20n .rt Specify the value to be used in the \fIinitial-flags\fR field in \fB/etc/ttydefs\fR. \fIinitial-flags\fR must be in a format recognized by the \fBstty\fR command. These flags are used by \fBttymon\fR when searching for the correct baud rate. They are set prior to writing the prompt. If this option is not specified, \fBsttydefs\fR will set \fIinitial-flags\fR equal to the \fBtermio\fR(7I) flag \fB9600\fR. .RE .sp .ne 2 .mk .na \fB\fB-n\fR \fInextlabel\fR\fR .ad .RS 20n .rt Specify the value to be used in the \fInextlabel\fR field in \fB/etc/ttydefs\fR. If this option is not specified, \fBsttydefs\fR will set \fInextlabel\fR equal to \fIttylabel\fR. .RE .sp .ne 2 .mk .na \fB\fB-l\fR[\fIttylabel\fR]\fR .ad .RS 20n .rt If a \fIttylabel\fR is specified, \fBsttydefs\fR displays the record from \fB/etc/ttydefs\fR whose TTY label matches the specified \fIttylabel\fR. If no \fIttylabel\fR is specified, \fBsttydefs\fR displays the entire contents of \fB/etc/ttydefs\fR. \fBsttydefs\fR verifies that each entry it displays is correct and that the entry's \fInextlabel\fR field references an existing .RE .sp .ne 2 .mk .na \fB\fB-r\fR \fIttylabel\fR\fR .ad .RS 20n .rt Remove any record in the \fBttydefs\fR file that has \fIttylabel\fR as its label. .RE .SH OUTPUT .sp .LP If successful, \fBsttydefs\fR will exit with a status of \fB0\fR. \fBsttydefs\fR \fB-l\fR will generate the requested information and send it to standard output. .SH EXAMPLES .LP \fBExample 1 \fRA sample of \fBsttydefs\fR command. .sp .LP The following command lists all the entries in the \fBttydefs\fR file and prints an error message for each invalid entry that is detected. .sp .in +2 .nf example# \fBsttydefs\fR \fB-l\fR .fi .in -2 .sp .sp .LP The following shows a command that requests information for a single label and its output: .sp .in +2 .nf example# \fBsttydefs\fR \fB-l\fR 9600 ------------------------------------------------------------------ 9600:9600 hupcl erase ^h:9600 sane ixany tab3 hupcl erase ^h::4800 ------------------------------------------------------------------ ttylabel: 9600 initial flags: 9600 hupcl erase ^h final flags: 9600 sane ixany tab3 hupcl erase ^h autobaud: no nextlabel: 4800 .fi .in -2 .sp .sp .LP The following sequence of commands will add the labels \fB1200\fR, \fB2400\fR, \fB4800\fR, and \fB9600\fR and put them in a circular list: .sp .in +2 .nf sttydefs \fB-a\fR 1200 \fB-n\fR 2400 \fB-i\fR 1200 \fB-f\fR "1200 sane" sttydefs \fB-a\fR 2400 \fB-n\fR 4800 \fB-i\fR 2400 \fB-f\fR "2400 sane" sttydefs \fB-a\fR 4800 \fB-n\fR 9600 \fB-i\fR 4800 \fB-f\fR "4800 sane" sttydefs \fB-a\fR 9600 \fB-n\fR 1200 \fB-i\fR 9600 \fB-f\fR "9600 sane" .fi .in -2 .sp .SH FILES .sp .LP \fB/etc/ttydefs\fR .SH SEE ALSO .sp .LP \fBattributes\fR(5), \fBtermio\fR(7I)