How do I get *8* data bits *no* parity?

James Logan III logan at vsedev.VSE.COM
Wed Nov 2 11:07:14 AEST 1988


In article <130 at tree.UUCP> stever at tree.UUCP (Steve Rudek) writes:
>We're running Micrport System V/AT release 2.4 and need to change the tty
>default for incoming modem calls from the default (7 data bits even parity)
>to 8 data bits no parity to better accomodate new callers.  About 6
>months ago, under 2.2, I spent quite a bit of time experimenting with the 
>gettydefs file.  As I recall, I tried changing the standard entry:
>
>1200# B1200 HUPCL PARENB CS7 CLOCAL OPOST ONLCR # B1200 HUPCL SANE IXANY TAB3 #login: #1200
>
>to:
>
>1200# B1200 HUPCL CS8 CLOCAL OPOST ONLCR # B1200 HUPCL SANE IXANY TAB3 #login: #1200
>
>but it didn't make any significant difference.  Why not?
>

Getty sets your line to seven data bits after you type in a login
name if you  don't tell it specifically how many data bits you
want.  (It has default settings so that the line is reasonable
when you don't tell it specifically what to use.)  Put CS8 after
the second pound-sign (#) like this:   

                                                        |
                                                        V
1200# B1200 HUPCL CS8 CLOCAL OPOST ONLCR # B1200 HUPCL CS8 SANE IXANY TAB3 #login: #1200

>...I'd be fascinated
>to hear the full story of what is really going on in a gettydefs entry.

It's pretty simple.  There is a line in /etc/inittab that causes
the init(1m) process to invoke getty(1m) with the specified
arguments.  One of the arguments is the "label" of a line in the
file /etc/gettydefs.  (By the way -- numbers in parenthesis refer
to UNIX manual section numbers; e.g. init(1m) refers to section
1M of the UNIX manuals entitled "System Administration Reference
Guide".) 

The lines in gettydefs(4) have the following format:

label#tty settings before#tty settings after#login prompt text#next label

(I'm doing this from memory, so please excuse me if I left out a
field...)  The "tty settings before" field contains settings that
are put into effect by calling ioctl(2) the first time the caller
types his/her login name.  As soon as the user presses return,
the "tty settings after" are set for the tty port and login(1) is
exec(2)ed, replacing the getty(1m) process.

Login(1) is called with the login name as its first parameter and
prompts the user for his/her password.  When the password is
incorrect, login continues prompting for the login-name/password
until a correct password is entered or its timeout value is
reached.  If The user presses ^D or login times out, login
dies and init(1m) starts another getty process.

Getty uses the "next label" field of the line when the calling user
presses the BREAK key.  When the BREAK key is pressed, getty uses
the line with "next label" in its "label" field and changes the
line settings to the new specification.  

Usually, the lines in gettydefs(4) form a circular linked list from
a high baud rate (like 9600) to the next lowest baud rate, down
to the lowest baud rate (like 300 baud) and back around to the
highest baud rate again.  This allows the caller to press BREAK
until getty matches the caller's baud rate.

The "login prompt text" field is the login message that getty gives
the caller.  You may change this to whatever you want, but after login
is called it uses its own "login:" prompt.

-- 
Jim Logan		logan at vsedev.vse.com
(703) 892-0002		uucp:	..!uunet!vsedev!logan
			inet:	logan%vsedev.vse.com at uunet.uu.net



More information about the Comp.unix.microport mailing list