4.2BSD/usr/src/usr.bin/uucp/README

INSTALLATION GUIDE
README	5.2	83/07/19

Tom Truscott, rti!trt,decvax!duke!trt (919)541-6488 Research Triangle Institute
Bob Gray, gray@berkeley, duke!adiron!bob (315) 336-4989

This is a variant of the uucp used at decvax, ittvax, rti, mcnc, adiron,
duke and others.  There have been tons of bug fixes and enhancements
from people on the usenet (thank you).  Speed is substantially
improved.  This version fixes essentially all of the McGeady's bug list.

Enhancements:

Dialers			Lots of dialers included.

Subdirectories		/usr/spool/uucp is now split into 7 subdirectories.
			This is a huge help on busy systems.

/usr/lib/uucp/L.cmds	List of commands permitted for remote execution.
			A line of form 'PATH=...' sets the search path.

expect-send sequence	Escape characters now permitted: \r, \n.
			\r, not \n, is default char sent at end of string.
			\c	(put at end of string). Dont send ending \r.
			\d	pause 1 second (\d\d pauses 2 seconds)
			"" P_ZERO  `expect nothing, start sending zero parity.'
			P_EVEN (default), P_ODD, P_ONE other parity modes.
			\05	Send a control-E
			"" ""   `expect nothing, send a \r'.

uupoll [sysname]	Polls named system.
uusnap			Displays spooled files, and pending uuxqts.


This version runs on all VAXen and PDPs under UNIX-V7 and 4.1bsd, 4.2BSD.
It also runs on Gould/SEL Concept series machines (e.g. 32/8750), 
DUAL 68000 unisoft.
It should not be hard to get it running on BTL system III, IV, and V.
On such systems, put "#define SYSIII" in uucp.h and pray.

UUCP installers should read the two papers (by Dave Nowitz)
in Vol 2B of version 7 manuals and UUAIDS/setup.tblms.
Understand each step below before executing.
Some steps will vary slightly from system to system.

**** INSTALLATION *******

1. If you are currently running uucp, save the old programs!:
	su root
	cd /usr/bin
	for i in uucp uux uulog uuname	     (csh: foreach i (uucp ....) )
	do
		cp $i $i.old
	done					(csh: end )
	cd /usr/lib/uucp
	for i in uucico uuxqt uuclean
	do
		cp $i $i.old
	done

2. Editing Makefile and uucp.h
	4.2 sites using the supported dialers are all set with defaults.

	non-4.2
		a) sites need to install the Berkeley directory reading library.
			Try (cd LIBNDIR; make install).
			Edit Makefile to have LIBNDIR= -lndir
			define NDIR in uucp.h.
		b) Check LDFLAGS, OWNER, GROUP, and LIBUUCICO.
		c) pick a method to allow uucp to know its system:
			Check out GETHOSTNAME/UNAME/WHOAMI/CCWHOAMI in uucp.h
		d) define SYSIII if appropriate in uucp.h.
		e) Your "make" may fail because the Makefile is so large.
			If so, in /usr/src/cmds/make/defs, change
			'#define NFLEFTS 60' to 512, and re-make make.

3. Make the new commands.
	make

4. WAIT UNTIL THE UUCP SYSTEM IS IDLE!! Single-user is best.
	su root  (it is important that chmod, chown and chgrp work below)

5. Install the new commands:
	make install
	(If you are chicken, type 'make -n install' first).

6. Edit and install the control files:
	Look in UUAIDS.  Edit and install into /usr/lib/uucp if necessary
	USERFILE, L.cmds, L.sys, L-devices, L-dialcodes.
	THESE FILES MUST BE OWNED BY THE SAME OWNER AND GROUP AS
	THE UUCP COMMANDS AND UUCP SPOOL FILES!!! (probably uucp, daemon).
	The format for dialers is slightly different so that any dialer
	can be handled.

7. Make new subdirectories:
	For safety:  cd /usr/spool/uucp; tar c .   (save Qed files on tape)
	The following assumes your site name is produced by `uuname -l`.
	make mkdirs
		If your system is duke, then the subdirectories created are
		named C., D., D.duke, D.dukeX, TM., XTMP and X..
	rmdir /usr/lib/uucp/.XQTDIR
		which is obsolete (XTMP replaces it).

8. Move old Qed files:
	If you have spooled files, they must be moved into the subdirectories.
	Assuming all spool files are in /usr/spool/uucp
	(i.e. you did not have subdirs before)
	the following command will move the spool files
	to the right subdirectories:
    make mvspoolfiles; ??? does this work now??????????
	Files beginning C. are put in the C. subdirectory, and so on.
	Files begining D.dukeX are put in that directory, *not* D..
	(Note: if you already had a subdirectory version of uucp,
	you need only create the new subdirectories mentioned above
	and move the relevant files there.
    Delete other old directories if you had any (e.g. "LOG.")

9. Compact /usr/spool/uucp:
	cd /usr/spool
	mkdir nuucp
	chown uucp nuucp
	chgrp daemon nuucp
	for i in uucp/*    		(csh: foreach i (uucp/*) )
	do
		mv $i nuucp
	done				(csh: end )
	rmdir uucp
	mv nuucp uucp
		(Note: this does *not* work if a filesystem is mounted on
		/usr/spool/uucp!  If that is the case, you should 'tar'
		/usr/spool/uucp somewhere, unmount, re-mkfs, and re-mount
		the filesystem, and tar the uucp files back.)

10. Test the new system
	Test by mailing a letter somewhere and back.
	If it works, the new system is probably fine.
	Otherwise, figure out what is wrong.
	Start by examining LOGFILE.  Try /usr/lib/uucp/uucico -r1 -sname -x7
	If things are no-go, you can back out the changes by restoring the
	old uu programs and the spooled files.
	NOTE: The subdirectories foul up a non-subdir version,
	so be sure that subdirectories exist/do not exist as appropriate.


11. Install handy UUAIDS
	Look in uuaids for handy other stuff.  In particular, uu.* are
	shell scripts that can be run via cron hourly, daily, and weekly
	to keep uucp trim.  L-devices, L-dialcodes, L.cmds, L.sys, USERFILE
	are sample files.  THEY MOST LIKELY NEED TO BE MODIFIED TO USE
	THEM ON YOUR OWN SYSTEM!

	uu.hourly		Makes sure sites are polled.
	uu.daily		Runs uuclean to clean up /usr/spool/uucp.
				**IT HANDLES SUBDIRECTORIES!!
				Renames LOGFILE to LOGFILE.old.
	uu.weekly		Renames SYSLOG to SYSLOG.old.
	The above scripts should be run via cron.

	uuq
		Reports number of command ('C.') files queued for each system,
		number of remote executions ('XQT') pending,
		and with what systems uucico is currently conversing.
		(It would also be handy to know the status of each site
		such as 'decvax: last connection 03:00 Fri Jan 20' and
		failures such as 'harpo: no answer 07:00 Fri Jan 20'.
		It would also be handy to have a manual page for this thing.)

	uuusage, uuusage.1, uutbl
		Summarizes SYSLOG.  Very handy.  (Alan S. Watt).
		Works best if you use uucp.daily.  Slow if SYSLOG is big.

	uurate
		More detailed summary of SYSLOG.  Useful for checking
		throughput.  Modified from program provided by ittvax!swatt.
		Slow if SYSLOG is big.

	uucp.daily
		Daily shell script run at ittvax.  Manages SYSLOG files in
		a convenient form for uuusage.  Not integrated in time
		for this distribution.


Comments, bug reports, *and improved code* are welcome.
	Tom Truscott 
	Bob Gray