8.  Uucp Installation

There are several source modifications that may be required before the system programs are compiled. These relate to the directories used during compilation, the directories used during execution, and the local uucp system-name.

The four directories are:

lib
(/usr/src/cmd/uucp) This directory contains the source files for generating the uucp system.
program
(/usr/lib/uucp) This is the directory used for the executable system programs and the system files.
spool
(/usr/spool/uucp) This is the spool directory used during uucp execution.
xqtdir
(/usr/spool/uucp/.XQTDIR) This directory is used during execution of execute files.

The names given in parentheses above are the default values for the directories. The italicized named lib, program, xqtdir, and spool will be used in the following text to represent the appropriate directory names.

There are two files which may require modification, the makefile file and the uucp.h file. The following paragraphs describe the modifications. The modes of spool and xqtdir should be made ``0777''.

Uucp.h modification

Change the program and the spool names from the default values to the directory names to be used on the local system using global edit commands.

Change the define value for MYNAME to be the local uucp system-name.

makefile modification

There are several make variable definitions which may need modification.

INSDIR
This is the program directory (e.g. INSDIR=/usr/lib/uucp). This parameter is used if ``make cp'' is used after the programs are compiled.
IOCTL
This is required to be set if an appropriate ioctl interface subroutine does not exist in the standard ``C'' library; the statement ``IOCTL=ioctl.o'' is required in this case.
PKON
The statement ``PKON=pkon.o'' is required if the packet driver is not in the kernel.

Compile the system The command

make

will compile the entire system. The command

make cp

will copy the commands to the to the appropriate directories.

The programs uucp, uux, and uulog should be put in ``/usr/bin''. The programs uuxqt, uucico, and uuclean should be put in the program directory.

Files required for execution

There are four files which are required for execution, all of which should reside in the program directory. The field separator for all files is a space unless otherwise specified.

L-devices

This file contains entries for the call-unit devices and hardwired connections which are to be used by uucp. The special device files are assumed to be in the /dev directory. The format for each entry is

line call-unit speed

where;

line
is the device for the line (e.g. cul0),
call-unit
is the automatic call unit associated with line (e.g. cua0), (Hardwired lines have a number ``0'' in this field.),
speed
is the line speed.

The line

cul0 cua0 300

would be set up for a system which had device cul0 wired to a call-unit cua0 for use at 300 baud.

L-dialcodes

This file contains entries with location abbreviations used in the L.sys file (e.g. py, mh, boston). The entry format is

abb dial-seq

where;

abb
is the abbreviation,
dial-seq
is the dial sequence to call that location.

The line

py 165-

would be set up so that entry py7777 would send 165-7777 to the dial-unit.

LOGIN/SYSTEM NAMES

It is assumed that the login name used by a remote computer to call into a local computer is not the same as the login name of a normal user of that local machine. However, several remote computers may employ the same login name.

Each computer is given a unique system name which is transmitted at the start of each call. This name identifies the calling machine to the called machine.

USERFILE

This file contains user accessibility information. It specifies four types of constraint;

[1]
which files can be accessed by a normal user of the local machine,
[2]
which files can be accessed from a remote computer,
[3]
which login name is used by a particular remote computer,
[4]
whether a remote computer should be called back in order to confirm its identity.

Each line in the file has the following format

login,sys [ c ] path-name [ path-name ] ...

where;

login
is the login name for a user or the remote computer,
sys
is the system name for a remote computer,
c
is the optional call-back required flag,
path-name
is a path-name prefix that is acceptable for user.

The constraints are implemented as follows.

[1]
When the program is obeying a command stored on the local machine, MASTER mode, the path-names allowed are those given for the first line in the USERFILE that has a login name that matches the login name of the user who entered the command. If no such line is found, the first line with a null login name is used.
[2]
When the program is responding to a command from a remote machine, SLAVE mode, the path-names allowed are those given for the first line in the file that has the system name that matches the system name of the remote machine. If no such line is found, the first one with a null system name is used.
[3]
When a remote computer logs in, the login name that it uses must appear in the USERFILE. There may be several lines with the same login name but one of them must either have the name of the remote system or must contain a null system name.
[4]
If the line matched in ([3]) contains a ``c'', the remote machine is called back before any transactions take place.

The line

u,m /usr/xyz

allows machine m to login with name u and request the transfer of files whose names start with ``/usr/xyz''.

The line

dan, /usr/dan

allows the ordinary user dan to issue commands for files whose name starts with ``/usr/dan''.

The lines

u,m /usr/xyz /usr/spool
u, /usr/spool

allows any remote machine to login with name u, but if its system name is not m, it can only ask to transfer files whose names start with ``/usr/spool''.

The lines

root, /
, /usr

allows any user to transfer files beginning with ``/usr'' but the user with login root can transfer any file.

L.sys

Each entry in this file represents one system which can be called by the local uucp programs. The fields are described below.

system name

The name of the remote system.

time

This is a string which indicates the days-of-week and times-of-day when the system should be called (e.g. MoTuTh0800-1730).

The day portion may be a list containing some of

or it may be Wk for any week-day or Any for any day.

The time should be a range of times (e.g. 0800-1230). If no time portion is specified, any time of day is assumed to be ok for the call.

device

This is either ACU or the hardwired device to be used for the call. For the hardwired case, the last part of the special file name is used (e.g. tty0).

speed

This is the line speed for the call (e.g. 300).

phone

The phone number is made up of an optional alphabetic abbreviation and a numeric part. The abbreviation is one which appears in the L-dialcodes file (e.g. mh5900, boston995-9980).

For the hardwired devices, this field contains the same string as used for the device field.

login

The login information is given as a series of fields and subfields in the format

where; expect is the string expected to be read and send is the string to be sent when the expect string is received.

The expect field may be made up of subfields of the form

where the send is sent if the prior expect is not successfully read and the expect following the send is the next expected string.

There are two special names available to be sent during the login sequence. The string EOT will send an EOT character and the string BREAK will try to send a BREAK character. (The BREAK character is simulated using line speed changes and null characters and may not work on all devices and/or systems.)

A typical entry in the L.sys file would be

sys Any ACU 300 mh7654 login uucp ssword: word

The expect algorithm looks at the last part of the string as illustrated in the password field.