home *** CD-ROM | disk | FTP | other *** search
/ Caldera Network Desktop 1.0 / caldera-network-desktop-1.0.bin / doc / HOWTO / mini / Getty-ps < prev    next >
Text File  |  1994-09-05  |  16KB  |  407 lines

  1. Mini getty_ps-HOWTO
  2.  
  3.     by Mark Horton    mah@ka4ybr.com, mah@ka4ybr.atl.ga.us
  4.  
  5.  
  6. OK, this seems to keep cropping up and I'm getting tired of
  7. emailing what works for me and serial lines and getty and
  8. uugetty (sorry about all the ands :) above !) so I'm posting
  9. this to c.o.l.help instead.  IMHO, mgetty+sendfax is a very
  10. nice package if you want to doitall with a single modem 
  11. line.  However, to create a getty/uugetty situation which
  12. serves dial-up lines, uucp in and outbound, and serial local
  13. devices, the getty_ps package (again IMHO) is an excellent   
  14. way to go. 
  15.  
  16. The suggestions below work on my systems and have, in one form
  17. or another, worked for almost two years of my Linux experiences.
  18. The fact that they work for me does NOT mean they are guaranteed
  19. to work for you.... I hope they do and make your life easier...
  20. if not, please accept my apologies and condolences.  If you
  21. have any suggestions or improvements to these procedures, 
  22. (other than "Stuff it up your $#@(%^") please contact me.  If
  23. you have questions about them and/or problems in getting your
  24. setup to work, please feel free to email me... I will try to
  25. answer any questions I can, but please give me a little more
  26. than "It don't work!" to go on... :)
  27.         -- Mark
  28.  
  29. So, all verbage and b.s. aside, here's my "cookbook" configuration:
  30.  
  31. 0.    a. Get getty_ps-2.0.7e from sunsite.unc.edu
  32.     b. Decide if you want to use the new FSSTND or not.
  33.        (This from the Makefile) :
  34. # FSSTND Compliance:
  35. #   If you want getty_ps to comply with the upcoming FSSTND document,
  36. #   uncomment the following line.  As a result, all config files will
  37. #   be expected in /etc/conf.* rather than /etc/default, modem locks
  38. #   will be created in /var/lock, and binaries will go in /sbin.
  39. #
  40. # FSSTND=-DFSSTND
  41.         I commented it out since I'm a curmudgeon and LIKE my defaults
  42.        in /etc/default (and couldn't figure out if the formats were
  43.        the same for the /etc/conf.* format... I admit it, I'm lazy)
  44.        I also didn't want to mess with Taylor and wanted my locks 
  45.        left in /usr/spool/uucp.  You will also note in the following
  46.        examples that I have violated the rules and put my executables
  47.        for getty and uugetty in /etc.... if you don't like it, put
  48.        them in /sbin or /bin if it pleases you... it's YOUR system!
  49.     c. READ the README.linux file to figure out where you want things
  50.        and how you want to proceed!!!!!!!!!!!!!!!!!!!
  51.     d. "make" and "make install"
  52.     e. Move getty and uugetty to where you want them. (I like /etc)
  53.     f. Make changes to /etc/inittab, /etc/gettydefs (or use defaults
  54.        in the distribution subdirectory Examples - I highly recommend
  55.        this!  It helps you avoid oversites like forgetting the INITLINE
  56.        parameter for manual (program) answering and wondering why the
  57.        modems just ring... and ring.... and ring....)  *blush*
  58.     g. Move the examples to /etc/default if you use that configuration
  59.        or figure out what they look like with the new FSSTND config. and
  60.        put them there.
  61.     h. Hack the uugetty.ttyS? and getty.ttyS? entries as desired (my 
  62.        sample uugetty.ttyS? is below.)
  63.     i. Change your /etc/rc.d/rc.serial as desired for your ports - 
  64.        remember - you have to do this even with the standard ports!
  65.        Make sure it gets executed on startup (a safe place to put it
  66.        is in rc.local! :)  NOTE: if you have a serial rodent and use 
  67.        the selection package, be sure to execute rc.serial PRIOR to
  68.        starting up selection!
  69.     j. Make the necessary changes to the uucp files Systems, Dialers, 
  70.        Devices, and Permissions.
  71.     k. Shutdown and reboot with the new getty.  Have your boot diskettes
  72.        handy in case of finger-checks... init is not too kind about errors
  73.        in /etc/inittab! 
  74.     l. try dialing out on one of your uucp lines (I like to use "cu -d" for
  75.        this so I can see that all is working as planned) and adjust as
  76.        necessary.  
  77.     m. For nasty problems, use the -D777 flag in /etc/inittab for the
  78.        lines in question to figure out what's going on... REMEMBER to
  79.        change it back after all is clean or you'll be burning up disk
  80.        space at a furious rate!
  81.  
  82.  
  83. 1.    /etc/rc.d/rc.serial :   (I use 2 STB-4COM cards)
  84.         (yours WILL most likely be different - read the man page!)
  85. #
  86. # /etc/rc.serial 
  87. #    Initializes the serial ports on your system
  88. #
  89. #    Version 2.01
  90.  
  91. cd /dev
  92.  
  93. SETSERIAL="/bin/setserial -b"
  94. PORTS=`echo cua?`
  95.  
  96. echo -n "Configuring serial ports...."
  97.  
  98. # Do wild interrupt detection
  99. #
  100. ${SETSERIAL} -W ${PORTS}
  101.  
  102. #
  103. # MANUAL CONFIGURATION 
  104. #
  105. ${SETSERIAL} /dev/cua0 -- uart 16550A port 0x3f8 irq 4 -fourport 
  106. ${SETSERIAL} /dev/cua1 -- uart 16550A port 0x2f8 irq 4 -fourport
  107. ${SETSERIAL} /dev/cua2 -- uart 16550A port 0x3e8 irq 4 -fourport
  108. ${SETSERIAL} /dev/cua3 -- uart 16550A port 0x2e8 irq 4 -fourport
  109. ${SETSERIAL} /dev/cua4 -- uart 16550A port 0x1f8 irq 3 -fourport
  110. ${SETSERIAL} /dev/cua5 -- uart 16550A port 0x1e8 irq 3 -fourport
  111. ${SETSERIAL} /dev/cua6 -- uart 16550A port 0x2a8 irq 3 -fourport
  112. ${SETSERIAL} /dev/cua7 -- uart 16550A port 0x1a8 irq 3 -fourport
  113. #
  114. ###########################################################
  115. #
  116. # Print the results of the serial configuration process
  117. #
  118. ###########################################################
  119.  
  120. echo "done."
  121.  
  122. ${SETSERIAL} -bg ${PORTS}
  123.  
  124.  
  125. 2.    /etc/gettydefs    (pretty much what comes with getty_ps):
  126. # [ put this file in /etc/gettydefs ]
  127. #
  128. # This file contains the startup and final flags for the
  129. # tty lines.  Each line starts with a SPEED value; this is
  130. # the same SPEED that you pass to [uu]getty.  Note that the
  131. # SPEED identifier is just a string; use whatever names
  132. # you want.
  133. #
  134. # The blank lines in this file are important (so I hear).
  135. #
  136. # The flags are the same flags you would pass to the stty
  137. # program.
  138. #
  139. # Format: <speed># <init flags> # <final flags> #<login string>#<next-speed>
  140. #
  141. #
  142. # Virtual Console entry
  143. VC# B38400 SANE CLOCAL # B38400 SANE -ISTRIP CLOCAL #@S login: #VC
  144.  
  145. # 38400 fixed baud Dumb Terminal entry
  146. DT38400# B38400 CS8 CLOCAL CRTSCTS # B38400 SANE -ISTRIP CLOCAL CRTSCTS #@S login: #DT38400
  147.  
  148. # 19200 fixed baud Dumb Terminal entry
  149. DT19200# B19200 CS8 CLOCAL # B19200 SANE -ISTRIP CLOCAL #@S login: #DT19200
  150.  
  151. # 9600 baud Dumb Terminal entry
  152. DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S login: #DT9600
  153.  
  154. # 38400 fixed-baud modem entry
  155. F38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S login: #F38400
  156.  
  157. # 19200 fixed-baud modem entry
  158. F19200# B19200 CS8 CRTSCTS # B19200 SANE -ISTRIP HUPCL CRTSCTS #@S login: #F19200
  159.  
  160. # 9600 fixed-baud modem entry
  161. F9600# B9600 CS8 # B9600 SANE -ISTRIP HUPCL #@S login: #F9600
  162.  
  163. # 38400 autobauding Modem entry with hard flow control
  164. 38400# B38400 CS8 CRTSCTS # B38400 SANE -ISTRIP HUPCL CRTSCTS #@S login: #38400
  165.  
  166. 19200# B19200 CS8 CRTSCTS # B19200 SANE -ISTRIP HUPCL CRTSCTS #@S login: #19200
  167.  
  168. 9600# B9600 CS8 CRTSCTS # B9600 SANE -ISTRIP HUPCL CRTSCTS #@S login: #9600
  169.  
  170. 2400# B2400 CS8 CRTSCTS # B2400 SANE -ISTRIP HUPCL CRTSCTS #@S login: #2400
  171.  
  172. 1200# B1200 CS8 CRTSCTS # B1200 SANE -ISTRIP HUPCL CRTSCTS #@S login: #1200
  173.  
  174. 300# B300 CS8 CRTSCTS # B300 SANE -ISTRIP HUPCL CRTSCTS #@S login: #300  
  175.  
  176.  
  177. 3.    /etc/inittab    (modified per getty_ps documentation) :
  178. #
  179. # inittab    This file describes how the INIT process should set up
  180. #        the system in a certain run-level.
  181. #
  182. # Version:    @(#)inittab        2.04    17/05/93    MvS
  183. #
  184. # Author:    Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
  185. #
  186. # Default runlevel.
  187. id:5:initdefault:
  188.  
  189. # System initialization (runs when system boots).
  190. si:S:sysinit:/etc/rc.d/rc.S
  191.  
  192. # Script to run when going single user.
  193. su:S:wait:/etc/rc.d/rc.K
  194.  
  195. # Script to run when going multi user.
  196. rc:123456:wait:/etc/rc.d/rc.M
  197.  
  198. # What to do at the "Three Finger Salute".
  199. ca::ctrlaltdel:/sbin/shutdown -t3 -rf now
  200.  
  201. # What to do when power fails (shutdown to single user).
  202. pf::powerfail:/sbin/shutdown -f +5 "THE POWER IS FAILING"
  203.  
  204. # If power is back before shutdown, cancel the running shutdown.
  205. pg:0123456:powerokwait:/sbin/shutdown -c "THE POWER IS BACK"
  206.  
  207. # If power comes back in single user mode, return to multi user mode.
  208. ps:S:powerokwait:/sbin/init 5
  209.  
  210. # The getties in multi user mode on consoles an serial lines.
  211. #
  212. # NOTE NOTE NOTE adjust this to your getty or you will not be
  213. #                able to login !!
  214. #
  215. # Note: for 'agetty' you use linespeed, line.
  216. # for 'getty_ps' you use line, linespeed and also use 'gettydefs'
  217. c1:12345:respawn:/etc/getty tty1 VC
  218. c2:12345:respawn:/etc/getty tty2 VC
  219. c3:45:respawn:/etc/getty tty3 VC 
  220. c4:45:respawn:/etc/getty tty4 VC
  221. c5:45:respawn:/etc/getty tty5 VC
  222. c6:45:respawn:/etc/getty tty6 VC
  223. c7:45:respawn:/etc/getty tty7 VC
  224. c8:45:respawn:/etc/getty tty8 VC
  225. c9:45:respawn:/etc/getty tty9 VC
  226. cx:45:respawn:/etc/getty tty10 VC
  227. cy:45:respawn:/etc/getty tty11 VC
  228. # cz:456:respawn:/etc/getty tty12 VC
  229.  
  230. # Serial lines
  231. #     To turn on debugging insert the -Dnnn parameter ex.:
  232. #    s3:45:respawn:/etc/uugetty -D777 ttyS3 F19200 vt100
  233. #     Debug levels:   (from getty.h)
  234. # define D_OPT   0001            /* option settings */
  235. # define D_DEF   0002            /* defaults file processing */
  236. # define D_UTMP  0004            /* utmp/wtmp processing */
  237. # define D_INIT  0010            /* line initialization (INIT) */
  238. # define D_GTAB  0020            /* gettytab file processing */
  239. # define D_RUN   0040            /* other runtime diagnostics */
  240. # define D_RB    0100            /* ringback debugging */
  241. # define D_LOCK  0200            /* uugetty lockfile processing */
  242. # define D_SCH   0400            /* schedule processing */
  243. # define D_ALL   0777            /* all priorities */
  244.  
  245. s0:45:respawn:/etc/getty ttyS0 DT9600
  246. s1:45:respawn:/etc/getty ttyS1 DT9600
  247. s2:45:respawn:/etc/getty ttyS2 DT9600
  248. s3:45:respawn:/etc/uugetty ttyS3 19200 vt100
  249. s4:45:respawn:/etc/uugetty ttyS4 19200 vt100
  250. s5:45:respawn:/etc/getty ttyS5 DT9600
  251. s6:45:respawn:/etc/uugetty ttyS6 19200 vt100
  252. s7:45:respawn:/etc/getty ttyS7 DT9600
  253.  
  254. # Runlevel 6 used to be for an X-window only system, until we discovered
  255. # that it throws init into a loop that keeps your load avg at least 1 all 
  256. # the time. Thus, there is now one getty opened on tty6. Hopefully no one
  257. # will notice. ;^)
  258. # It might not be bad to have one text console anyway, in case something 
  259. # happens to X.
  260. x1:6:wait:/etc/rc.d/rc.6
  261.  
  262. # End of /etc/inittab
  263.  
  264.   
  265.  
  266.  
  267. 4.    /etc/default/uugetty.ttyS4    (a sample)
  268.     [note: the init string is for DSI Scout+ modems - yours WILL
  269.     most likely be different!]
  270.  
  271. # sample uugetty configuration file for a Hayes compatible modem to allow
  272. # incoming modem connections
  273. #
  274.  
  275. # this config file sets up uugetty to answer with a WAITFOR string.  When
  276. # using waitfor, it is necessary to specify INITLINE=cua?
  277.  
  278. ISSUE=/etc/issue
  279.  
  280. LOGIN=/bin/login
  281.  
  282. # line to use to do initialization.  All INIT, OFF, and WAITFOR functions
  283. # are handled on this line.  If this line is not specified, any other
  284. # program that wants to share the line (like kermit, uucp, seyon) will 
  285. # fail.  This line will also be checked for lockfiles.
  286. #
  287. # format: <line> (without the /dev/)
  288. INITLINE=cua4
  289.  
  290. # timeout to disconnect if idle...
  291. TIMEOUT=60
  292.  
  293. # modem initialization string... Sets the modem to disable auto-answer
  294. #
  295. # format: <expect> <send> ... (chat sequence)
  296. INIT="" \d+++\dAT\r OK\r\n ATH0\r OK\r\n AT\sM0\sE1\sQ0\sV1\sX4\sS0=0\s*S0\s*M0\s*T0\r OK\r\n
  297.  
  298. # waitfor string... if this sequence of characters is received over the line,
  299. # a call is detected.
  300. WAITFOR=RING
  301.  
  302. # this line is the connect chat sequence.  This chat sequence is performed
  303. # after the WAITFOR string is found.  The \A character automatically sets
  304. # the baudrate to the characters that are found, so if you get the message
  305. # CONNECT 2400, the baud rate is set to 2400 baud.
  306. #
  307. # format: <expect> <send> ... (chat sequence)
  308. CONNECT="" ATA\r CONNECT\s\A
  309.  
  310. # this line sets the time to delay before sending the login banner
  311. DELAY=2
  312.     
  313.  
  314. 5.    /var/lib/uucp/hdb_config/Devices    (this is a Slackware dist.)
  315. # Devices 
  316. #
  317. # Everybody works at these speeds :
  318. ACU cua3 - 9600 scout \D
  319. ACU cua4 - 9600 scout \D
  320. ACU cua6 - 9600 scout \D
  321. #
  322. ACU cua3 - 2400 scout \D
  323. ACU cua4 - 2400 scout \D
  324. ACU cua6 - 2400 scout \D
  325. #
  326. ACU cua3 - 38400 scout \D
  327. ACU cua4 - 38400 scout \D
  328. ACU cua6 - 38400 scout \D
  329. #
  330. # This one works - connect at 14400 in reality using v.32bis :
  331. ACU cua4 - 19200 scout \D
  332. ACU cua3 - 19200 scout \D
  333. ACU cua6 - 19200 scout \D
  334. #
  335. #  This is to force a certain system to always use one line.
  336. ACUX cua3 - 19200 scout \D
  337. # ACUX cua4 - 19200 scout \D
  338. # ACUX cua6 - 19200 scout \D
  339.  
  340.  
  341. 6.     /var/lib/uucp/hdb_config/Dialers    (this is a Slackware dist.)
  342.     (please note the *E0 for no error correction, no compression... uucp
  343.     does just fine by itself... use of anything other (in my experience)
  344.     just slows things down!)
  345. #
  346. # Dialers - note the setup strings to set the TrailBlazer registers
  347. #
  348. scout    =W-,    "" A\pA\pA\pT\r OK \pAT&F\r OK \pATM0*Q0*T0*E0DP\T CONNECT
  349. tbfast    =W-,    "" A\pA\pA\pT OK ATS50=255DP\T CONNECT\sFAST
  350. tbslow    =W-,    "" A\pA\pA\pT OK ATS50=2DT\T CONNECT\s1200
  351. tbmed    =W-,    "" A\pA\pA\pT OK ATS50=3DT\T CONNECT\s2400
  352.  
  353.  
  354. 7.    /var/lib/uucp/hdb_config/Systems    (this is a Slackware dist.)
  355.     (please note that I've shortened this to just a few entries and removed
  356.     secure information such a phone numbers and passwords.)  And before I
  357.     get a lot of flak about the connect strings, let me say "Tough!" I want
  358.     my connect sequences to blast through no matter what state the receiving
  359.     modems are in!
  360. # UUCP Systems file: System ka4ybr
  361. asystem Any ACU 19200 nnnnnn1 "" \r ogin:-\K-ogin:-\K-ogin:-\K-ogin:-\K-ogin: \d\Euuka4ybr word: \dpassword
  362. asystem Any ACU 19200 nnnnnn2 "" \r ogin:-\K-ogin:-\K-ogin:-\K-ogin:-\K-ogin: \d\Euuka4ybr word: \dpassword
  363. bsystem Any ACU 9600 nnnnnn3 "" \r ogin:-\K-ogin:-\K-ogin:-\K-ogin:-\K-ogin: \d\Euuka4ybr\r word: \dpassword
  364. csystem Any ACUX 19200 nnnnnn4 "" \r ogin:-\K-ogin:-\K-ogin:-\K-ogin:-\K-ogin: \d\Euuka4ybr\r word: \dpassword
  365.   
  366.  
  367.  
  368. 8.    /var/lib/uucp/hdb_config/Permissions    (this is a Slackware dist.)
  369.     LOGNAME=nuucp
  370.     LOGNAME=uuv43test
  371.  
  372. MACHINE=asystem LOGNAME=uuasystem \
  373. COMMANDS=/bin/rmail:/usr/bin/rsmtp:/usr/bin/smail:/usr/bin/uucp:/usr/local/lib/news/bin/rnews:/usr/bin/uux \
  374.     READ=/var/spool/uucppublic:/usr/spool/uucppublic:/usr/tmp:/usr/local/lib:/var/spool/news:  \
  375.     WRITE=/var/spool/uucppublic:/usr/spool/uucppublic:/usr/tmp:/usr/local/lib/news:/usr/spool/news:/var/spool/news \
  376.     SENDFILES=yes REQUEST=yes
  377.  
  378. MACHINE=bsystem LOGNAME=uubsystem \
  379. COMMANDS=/bin/rmail:/usr/bin/rsmtp:/usr/bin/smail:/usr/bin/uucp:/usr/local/lib/news/bin/rnews:/usr/bin/uux \
  380.     READ=/var/spool/uucppublic:/usr/spool/uucppublic:/usr/tmp:/usr/local/lib:/var/spool/news:  \
  381.     WRITE=/var/spool/uucppublic:/usr/spool/uucppublic:/usr/tmp:/usr/local/lib/news:/usr/spool/news:/var/spool/news \
  382.     SENDFILES=yes REQUEST=yes
  383.  
  384. MACHINE=csystem LOGNAME=uucsystem \
  385. COMMANDS=/bin/rmail:/usr/bin/rsmtp:/usr/bin/smail:/usr/bin/uucp:/usr/local/lib/news/bin/rnews:/usr/bin/uux \
  386.     READ=/var/spool/uucppublic:/usr/spool/uucppublic:/usr/tmp:/usr/local/lib:/var/spool/news:  \
  387.     WRITE=/var/spool/uucppublic:/usr/spool/uucppublic:/usr/tmp:/usr/local/lib/news:/usr/spool/news:/var/spool/news \
  388.     SENDFILES=yes REQUEST=yes
  389.  
  390.  
  391. 9.    /etc/passwd entries     (samples)
  392. uuasystem:6sEM8hx9x6efw:613:5:Node asystem:/var/spool/uucppublic:/usr/lib/uucp/uucico 
  393. uubsystem:6sEM8hx9x6efw:614:5:Node bsystem:/var/spool/uucppublic:/usr/lib/uucp/uucico 
  394. uucsystem:6sEM8hx9x6efw:615:5:Node csystem:/var/spool/uucppublic:/usr/lib/uucp/uucico 
  395.  
  396.  
  397. mah@ka4ybr.com    94/06/27
  398.  
  399. --
  400. "Linux!     Guerrilla UNIX Development     Venimus, Vidimus, Dolavimus."
  401. ------------------------------------------------------------
  402. Mark A. Horton       ka4ybr             mah@ka4ybr.atl.ga.us
  403. P.O. Box 747 Decatur GA US 30031-0747         mah@ka4ybr.com
  404. +1.404.371.0291                     33 45 31 N / 084 16 59 W
  405.  
  406.