el /etc/inittab. init getty, . initial-flags , getty - . getty , - 14-9 - termio() User's Reference. - . 300 , 300. - 14-10 - final-flags ( , getty - login. - . . SANE ( , - , 3 (- ), IXANY ( ) HUPCL ( - ). . login-prompt LOGIN, - . , , . "@" login ( - , ) /etc/systemid ( @ '\'). , : \n \t \r \f \v \b \nnn (3 ) ASCII next-label gettydefs getty , - . Getty , BREAK - . , TTY , , getty - , . login-program , . - - 14-10 - /etc/login. - . AUTO, getty - , - ( tty03) - login. - 14-11 - (#) - gettydefs . gettydefs : 4#B1200 SANE TAB3 HUPCL #login: #2#AUTO /etc/login new : * 4 getty; * 1200; * (1200), SANE ( ) HUPCL (- ); * login : login. , getty 2 gettydefs; * AUTO /etc/login new. filename, - login. (, filename - login ). , /etc/dil_login , . , , . , , /etc/default/dial_login.  gettydefs /etc/gettydefs -  . - /etc/inittab. init - getty. - 14-12 - gettydefs - . : 4 # B2400 HUPCL # B2400 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 5 5 # B4800 HUPCL # B4800 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 6 6 # B6900 HUPCL # B6900 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 4 - gettydefs , getty 1200 : 1. c gettydefs. 2. 2400 1200. 3. gettydefs . - : 4 # B1200 HUPCL # B1200 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 5 5 # B4800 HUPCL # B4800 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 6 6 # B6900 HUPCL # B6900 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 4 gettydefs. stty(C) User's Reference. , , gettydefs , next-label getty - . , 300 gettydefs - : 1. /etc/ gettydefs. - 14-13 - 2. , gettydefs. ; getty . . 3. # B300 HUPCL # B300 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 4 4. 7 next_label 6 7: 6 # B6900 HUPCL # B6900 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 7 Getty 6 7 - 4. 5. - gettydefs. gettydefs : 4 # B1200 HUPCL # B1200 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 5 5 # B4800 HUPCL # B4800 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 6 6 # B6900 HUPCL # B6900 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 7 7 # B300 HUPCL # B300 CS8 SANE HUPCL TAB3 ECHOE IXANY #\r\n@!login: # 4   , gettydefs - , getty - , getty - . gettydefs : getty -c /etc/gettydefs - 14-14 - gettydefs , getty - - . getty gettydefs getty(M) gettydefs(F) User's Reference. - 14-15 -   "" enable, - . - , - , . - stty (set tty). "- " , gettydefs, stty, .  , stty, , . , tty2a, tty2a "", stty , . , - - . stty while - stty. stty </dev/ttyname, - , . - stty, . - , : stty , - . : 2stty < ttyname - 14-15 - ttyname - , ( " UNIX "). - - /dev/tty1a: - 14-16 - stty < /dev/tty1a , . - stty() User's Reference. . , , - . , , ( - ). , , - - : 2(stty 1baud-rate; while:; do sleep 3600; done) < ttyname &, baud-rate - , ttyname - , - , - . 50, 75, 110, 134, 150, 200, 300, 600, 1200, 2400, 4800 9600. : (stty 9600; while:; do sleep 3600; done) < /dev/tty1a & /dev/tty1a 9600. , ", " (<) , . , . , - . stty tabs , - 14-16 - ( , - ) : stty echoe , , <BKSP>. , stty , - , . stty(C) User's Reference. - 14-17 -   UNIX , - . TERM, , , /etc/termap. , - . E Bourne shell (sh), TERM : 2TERM=1termtype; export Term (csh), TERM : 2setenv TERM termtype termtype , , /etc/termcap. - , . "ansi" Bourne , , ("$"): TERM=ansi; export TERM <>. ("%")  setenv TERM ansi <>. , termtype, /etc/termcap, terminals (M) User's Reference, , /etc/termcap. : more /etc/termcap <>. - 14-18 - - , , TERM .profile ( " .profile .login" " "). - tset(C) User's Reference. , - , - , . - , , . , . - 14-19 -   , - , - : 1. , ttyname , : tty 2. root /etc/ttytype . - , , - . . - , wy50 /dev /tty1a, /etc/ttytype : wy50 tty1a 3. tset(C) - . .login - : tset -s -q > /tmp/tset$$; source /tmp/tset$$; /bin/rm/tmp/tset$$ setenv(C), TERM TERMCAP .login. .profile Bourne : eval 'tset -s' tset - .profile. 4. , - . termtype : env - 14-20 -   - , , - . , - , disable(C). : 1. . 2. . 3. disable . - : 2disable ttyname ttyname - , . , : disable /dev/tty1a , /dev/tty1a. 4. . , , . - 14-21 -    MSCREEN multiscreen(M), , login , . , , , login, , . WYS60 . WYS60 . , . login , ( ) - , . WYS60, . mscreens. - mscreen , logging , . " ttys", tty, - . tty - , - , - , . tty . -tty - , - - tty. -ttys, , . -tty , - /dev "pty" "ttyp", . "" tty, - "". tty. 16 8 -ttys . -ttys 14-1. - 14-21 - -ttys, , - NSPTTYS, -ttys, ( 16). 32 - -ttys. 16 -ttys, - -ttys. , " - 14-22 - 8 9 10" 14-1 23, , 16 -ttys ((0 - 7) ). , - -ttys. 31, - 32. +--------------------------------------------------------------+ |# '1 /dev/ptyp*' , :| |# crw----------- 1 59, 26 08:21 /dev/ptyp0 | |# | |# " " (), -| |# | |major_master=59 | |# '1 /dev/ptyp*' , :| |# crw----------- 1 58, 26 08:21 /dev/ttyp0 | |# | |# " " (), -| |# | |major_slave=58 | |for x in 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |do | | # make master ( ") | | /etc/mknod /dev/ptyp$x c $major_master $x | | chown bin /dev/ptyp$x | | chgrp terminal /dev/ptyp$x | | chmod 600 /dev/ptyp$x | | | | # make slave ( "") | | /etc/mknod /dev/ptyp$x c $major_slave $x | | chown bin /dev/ptyp$x | | chgrp terminal /dev/ptyp$x | | chmod 600 /dev/ptyp$x | |done | +--------------------------------------------------------------+ . 14-1. maketyps. 1. -ttys. " " " " - 14-22 - configure(ADM). 3, , i - NSPTTYS . - . 2. 14-1 , - "makeptys". - , : chmod 744 makeptys - 14-23 - 3. , root - : ./makeptys 4. - getty -tty. /etc/inittab / etc/conf/cf.d/init.base. , -ttys : p0:2:respawn:/etc/getty ttyp0 m p1:2:respawn:/etc/getty ttyp1 m p2:2:respawn:/etc/getty ttyp2 m p3:2:respawn:/etc/getty ttyp3 m p4:2:respawn:/etc/getty ttyp4 m p5:2:respawn:/etc/getty ttyp5 m p6:2:respawn:/etc/getty ttyp6 m p7:2:respawn:/etc/getty ttyp7 m . 8 -ttys "" "- ". ( , -ttys ). "", , : enable p0 -tty /dev/ttyp0. ( -ttys, ). . , - . , 8 - -ttys, : p8:2:respawn:/etc/getty ttyp8 m p9:2:respawn:/etc/getty ttyp9 m p10:2:respawn:/etc/getty ttyp10 m p11:2:respawn:/etc/getty ttyp11 m p12:2:respawn:/etc/getty ttyp12 m p13:2:respawn:/etc/getty ttyp13 m p14:2:respawn:/etc/getty ttyp14 m p15:2:respawn:/etc/getty ttyp15 m - 14-24 - 5. :  /tcb/lib/ttys_update , - . mscreen - . - . , - , , , . , mscreen , - . - , login, mscreen, , , - . - . , , , - Vi . , - shl(C) mscreen login. shl User's Reference.   mscreen - . , mscreen. mscreen , - . , - 14-24 - , - . mscreen /etc/mscreencap - , - . /etc/mscreencap . , mscreen, . - /etc/mscreencap . mscreen , - /etc/mscreencap, mscreen . , mscreen mscreencap, mscreen , : - 14-25 - -  -ttys. -ttys, -ttys . 14-1 -ttys. -  . , /etc/mscreencap . /etc/mscreencap , mscreen. : , . -  mscreen. mscreen , - : 1. : 2ps -uusername 2. 2mscreen: 2kill -g process_numbers   , mscreen - . mscreen - - mscreen mscreen. mscreen(M) mscreen .login . - mscreen 14-2 mscreen WYSE 60, mscreen. 14-3 .profile - Bourne. , - .login .profile - tset. - 14-26 - +--------------------------------------------------------------+ |# Example material for the end of a C-Shell .login file. | |# If logging in via pseudo-tty, surpress terminal | |# initialization | |set ttyname='tty' | |( .login . | | -tty, | | . ttyname='tty')| |# Set init to null, iitially.| | |set init=' ' | |( init , . | | init=' ') | |set noglob | |# Reset init to the valur "-I" when logging in on a pseudo-tty| |# to surpress the tset terminal initializations string. | |if ( 'expr $ttyname : "/dev/ttyp"' > 0 ) set init = "-I" | |set term = ('tset -m ansi:ansi -m wy60 -m:?wy60 -r -S -Q | |$init') | |setenvTern $term[1] | |setenvTERMCAP $term[2] #terminal data base | |unset noglob term | |# Put WYSE 60 in ECON-80 mode during initial log in process. | |( WYSE 60 ECON-80 | | ) | |if ( "$init" !="-I" && "STERM" == "wy60" ) /bin/echo | |"\033eG\c" | |# Set the prompt to indicate the tty number of the current | |# mscreen and command. | |( , tty | |mscreen ). | |set prompt = "'expr $ttynamt : '/dev/)' ` % " | |# Release the local variable used. | |( ). | |unset ttyname init | |# Run mscreen and logout if the 'stop' key (defined as S-F9 in| |# the default /etc/mscreencap for wy60) is pressed. This | |# string is described in the mscreen(M) manual pages. | |( mscreen , "" (| | S-F9 /etc/mscreencap | |wy60 . mscreen(M)). | |mscreen -n 3 | |if ($status == 0) logout | +--------------------------------------------------------------+ . 14-2. .login. - 14-27 - +--------------------------------------------------------------+ | # | | # Example material for the end of a Bourne shell .profile | | # file | | ( .profile Bourne) | | | | ttyname='tty' | | | | init="' | | | | if [ `expr $ttyname : "/dev/ttyp"` -gt "0" ] | | then | | init="-I" | | fi | | eval `tset -m ansi:ansi -m wy60:wy60 -m :?wy60 -r -s -q | | $init` | | export PATH | | | | if ["$init" = "-I" -a "STERM" = "wy60" ] | | them | | /bin/echo "\033eg\c" | | fi | | | | PSI=`expr $ttyname : '/dev')'` $ " | | | | unset ttyname init | | | | mscreen -n 3 | | if [ "$?" = "0" ] | | then | | exit | | fi | +--------------------------------------------------------------+ . 14-3. .profile. termcap ( wy60) - ( mscreen - ) . 2 3 tset() .login. - 14-27 - -ttys tset -I. - "init" tset. , - tset "init" , "", - tset. tset login "\033tG\c". COLUMNS WYSE60 ECON-80. - . -tty, . WYSE60, mscreen - , - 14-2 14-3. - 14-28 -   , - UNIX.   . 14.1 - . 14.1 +-----------+-------------------------------------------------+ | | | +-----------+-------------------------------------------------+ | /dev/tty1a|  | | | | | /dev/tty1A|  | | | | | /dev/tty2a|  | | | | | /dev/tty2A|   | | | | +-----------+-------------------------------------------------+ /dev/tty1a /dev/tty1A - ( /dev/tty2a /dev/tty2A). - - . : cannot open: device busy ( : ) , - , /dev/tty[1,2] [-m] , /dev/tty[1,2] [-] - . - 14-28 -   up(C) uucp(C) UNIX. /usr/lib/uucp/Devices ( Devices) , . Devices , , , , - , UUCP. ( , ). - 14-29 - cu UUCP , () /usr/lib/uucp/dialHA12, /usr/lib/uucp/Dialers. ( - Dialers " UUCP" ). - /usr/lib/uucp. - ,