home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
s
/
s42-uucp.zip
/
README
< prev
next >
Wrap
Text File
|
1993-02-08
|
8KB
|
245 lines
UUCP fix and miscellaneous pointers for SVR4.2.1 and UnixWare 1.0.
2/8/93
by Jason Levitt
DISCLAIMER: None of the information or files contained herein are
sanctioned by USL or Univel. Use at your own risk. They work for
me, they may not work for you.
This file contains two fixes for UUCP under SVR4.2 version 1 as
well as practical info on setting up UUCP using ttymon and the Service
Access Facility (SAF) rather than the traditional uugetty. I'm using
the UnixWare Application Server distribution, but the information should
be applicable to any SVR4.2.1 system.
If you want the theory behind this stuff, you can slog
through the SVR4.2 or UnixWare docs and look at the tty monitor (ttymon)
and connection server (cs). Also, there's the trusted path (tp)
junk which is also involved. Frankly, I don't understand it all yet. I
just want UUCP to work.
I have UUCP working smoothly now. My only complaint is that,
after dialouts, it can take up to 40 seconds before DTR is asserted again.
I. UUCP fixes for SVR4.2.1
Fix #1. Replace your ttymon
Problem: The ttymon shipped with SVR4.2.1 is broken. In
particular, DTR is not always asserted.
Solution: Replace your ttymon with the one in this archive.
Replace your existing /usr/lib/saf/ttymon
with the one in this archive. Make sure that
the permissions match. It's probably a good
idea to save your old ttymon.
# ls -l ttymon
-r-xr--r-- 1 root sys 156952 Feb 5 16:30 ttymon
-r-xr--r-- 1 root sys 157588 Nov 2 13:18 ttymon.old
From the command line, you can do "chmod 544 /usr/lib/saf/ttymon" to
make the permissions right.
Fix #2. Changing the trusted path switch time
Problem: the trusted path data channel sometimes does not release the
tty after a dialout has completed. Dialins are accepted, but
dialouts always fail because the tty is busy. I'm not sure if this
is a problem with all systems. If you don't have this problem, DON'T
change anything!
Solution: Edit the file /etc/conf/pack.d/tpath/space.c and change the
trusted path switch time. Then rebuild the kernel.
/*
* Time interval (expressed in milliseconds) to delay in switching SAK
* definition from saktypeNONE to saktypeDATA when the TP data channel
* is disconnected from the TP device.
* A value of zero, 0, indicates no delay.
*/
clock_t tp_saktypeDATA_switchdelay = 1000;
Change this value to 2000 or 4000 (2 or 4 seconds).
Then run /etc/conf/bin/idbuild to rebuild the kernel. A lower or higher
value might work better. I'm not sure how system dependent this is. 4000
worked on my machine, but 2000 didn't.
Changing this value may impact system performance. Can someone out
there explain this parameter?
II. Setting up and debugging UUCP under SVR4.2.1 using ttymon
I'm assuming that you are familiar with setting up HoneyDanBer UUCP
on some other Unix System.
1. Setup the Service Access Facility (SAF) monitors
I used the "sysadm" program to configure stuff, and then I hand edited
the results. sysadm is ok for starting and stopping the port service
(choose "ports" and then "port services"), but is unreliable, IMHO, for
modifying the port service or removing a port service.
If you only have the UnixWare Personal Edition, you probably don't
have sysadm. I think it's in the Personal Utilities add-on package.
There are also the /usr/X/adm/addttymon and /usr/X/adm/delttymon scripts
which are very buggy on my system though a good shell script
hacker could probably fix them. But I did look at the scripts and
I think I figured out the two commands that would create my port monitor
and port service:
sacadm -a -p ttymon1 -t ttymon -c "/usr/lib/saf/ttymon" -v 2
pmadm -a -p ttymon1 -s 01h -v 2 -fu -S login -m \
"`ttyadm -b -h -r0 -t 10 -d /dev/tty01h -s /usr/bin/shserv \
-l 19200H -m ldterm -p \"SVR4.2 login: \"`"
I suggest customizing these two commands and running them from your
command line. Run them in order, sacadm first, then pmadm.
2. UUCP and SAF configuration files
I have a 486 PC with two serial ports. I put a Telebit TrailBlazer Plus
on COM2, tty01. I only allow 19200 baud PEP connections on dialin but
I dialout with 19200 baud PEP or 2400 baud. You'll need to change a few
things below if you want things differently.
My pertinent configuration files are listed below:
/etc/saf/ttymon1/_pmtab
01h:u::reserved:reserved:login:/dev/tty01h:bhr:0:/usr/bin/shserv:10:19200H:ldterm:SVR4.2 login\: :::::#
/etc/saf/_sactab
tcp:listen::3:/usr/lib/saf/listen -m inet/tcp0 tcp 2>/dev/null #
inetd:inetd::0:/usr/sbin/inetd #internet daemon
ttymon1:ttymon::0:/usr/lib/saf/ttymon #
/etc/uucp/Devices
ACU tty01h,M - 19200 tbfast
ACU tty01h,M - 2400 tb2400
Direct tty01h,M - 19200 direct_modem
Direct tty01h,M - 2400 direct_modem
/etc/uucp/Dialers
tbfast =W-, "" A\pA\pA\pT OK \Mats61=0s50=255S95=2DT\T CONNECT\sFAST \m\c
tb2400 =W-, "" A\pA\pA\pT OK \Mats61=0s50=3S95=0DT\T CONNECT\s2400 \m\c
/etc/uucp/Devconfig
service=uucico device=ACU push=ldterm
service=cu device=ACU push=ldterm
/etc/ttydefs
19200H: 19200 : 19200 ixany parenb sane tab3 hupcl ::2400H
2400H: 2400 : 2400 ixany parenb sane tab3 hupcl ::19200H
Telebit TrailBlazer Plus settings:
E0 F1 M1 Q6 T V1 W0 X1 Y0 &P0 &T4 Version BC7.00
S00:002 S01=000 S02=043 S03=013 S04=010 S05=008 S06=002 S07=040 S08=002 S09=006
S10=007 S11=070 S12=050 S18=000 S25=005 S26=000 S38=000
S41=000 S45=000 S47=004 S48=000 S49=000
S50:255 S51:254 S52:002 S54:003 S55=000 S56=017 S57=019 S58:000 S59=000
S61:000 S62=003 S63=001 S64:001 S65=000 S66:001 S67=000 S68:003 S69=000
S90=000 S91=000 S92=000 S94=001 S95=000 S96=001 S97=000 S98=003
S100=000 S101=000 S102=000 S104=000 S105=001 S106=000 S107=020
S110:001 S111:030 S112=001
S121=000 S130=002 S131=002
S150=000 S151=004 S152=001 S153=001 S154=000 S155=000 S157=000 S158=000
S160=010 S161=020 S162=002 S163=003 S164=007 S169=000 S255=000
Permissions on the tty files after configuring /dev/tty01
# ls -l /dev/tty0*
crw-rw-rw- 1 root root 3, 0 Jan 28 07:42 /dev/tty00
crw-rw-rw- 1 root root 3, 1 Jan 28 07:42 /dev/tty00h
crw-rw-rw- 1 root root 3, 0 Jan 28 07:42 /dev/tty00s
crw-rw-rw- 1 root tty 3, 2 Jan 28 07:42 /dev/tty01
crw-rw-rw- 1 root tty 3, 3 Jan 28 07:42 /dev/tty01h
crw-rw-rw- 1 root tty 3, 2 Jan 28 07:42 /dev/tty01s
3. Debugging UUCP
a. Find the connection server (cs) process and kill it.
Then restart it with the debug flag.
CAUTION: leaving the cs process running in debug mode may be a
serious security hole since it prints out the passwords
of systems that you dial. Also, the cs.debug file will get
really big if you don't truncate it occasionally.
# ps -ef | grep cs
root 426 1 0 16:52:24 ? 0:01 /usr/sbin/cs
root 1533 1532 0 08:59:15 pts/2 0:00 grep cs
root 1532 1520 1 08:59:15 pts/2 0:00 /bin/sh -c ps -ef | grep cs
# kill -15 426
# /usr/sbin/cs -d
#
b. Open a terminal window, become superuser, and "tail -f" the log file.
Whenever outgoing "cu" or "uucico" sessions happen, you'll see the chat script
debug output in this window. You'll get some additional info if you use
/usr/lib/uucp/Uutry or "cu -d" to dialout.
# tail -f /usr/adm/log/cs.debug
c. Here's another idea. Do a truss -p on the ttymon process to see
what it's doing.
# ps -ef | grep ttymon
root 281 1 0 12:29:28 console 0:00 /usr/lib/saf/ttymon -g -v -p Cons
ole Login: -d /dev/syscon -l console
root 289 280 0 12:29:31 ? 0:00 /usr/lib/saf/ttymon
# truss -p 289
4. stopping and starting the ttymon port service
These commands are equivelant to enabling and disabling the
tty port on other versions of Unix. You can do the same
thing, but slower, through the sysadm command by choosing
"ports", "port services", and then the enable and disable
selections. The command line is much faster:
Starting it:
# sacadm -s -p ttymon1
Stopping it:
# sacadm -k -p ttymon1
5. Error messages
NO DEVICES AVAILABLE
The tty device is not configured under a ttymon.
DEVICE FAILED
The tty device is configured under a ttymon but is
not available. It's probably busy. Look for errno=16 in
your cs.debug output.
** END OF FILE