OPR / LPD / OPQ / OPCTL
	The latest Melbourne Uni spooler

'make' is the only sane way to build any of these programs, the relationships
among the files are positively beyond comprehension.

Other junk needed:
	1) /etc/printers: an ascii file containing details of what printers
are available, what options should be used for setup ..., There should
be a manual entry 'printers(5)' somewhere, if not you could look in
printers.c & try to work it out for yourself.
There is also a sample (etc_printers) which is a copy of our /etc/printers file

	2) /usr/spool/lpd - a directory that anyone can write in
(Or by changing local.h, a writeable directory just about anywhere)

	3) The MU lock device driver (not necessary, but it ensures that
two lpd's cannot be active at once, and removes problems with lock files
if the system crashes (UNIX, or just 'lpd')) If you have it, define LOCK
in local.h, otherwise undefine it.

Setup:
	FIRST - look at local.h & fix it up to meet your needs, THEN
	try 'make'
	then 'make install'

plus make & install an /etc/printers file, and the spool directory.
You will then probably want to alter the banner page layout, that is
coded into 'banner.c' - it should be easy enough to change.

Notes:
	lpd & opctl must be set uid root. lpd is quite safe and is
not open to abuse by nasty users. The '-r' opr flag works quite nicely.
('opr -r' will not work if the file to be removed is hidden down some
protected directory subtree, that the user who requested it cannot
search down, even if he could have removed the file with 'rm' -
naturally files the user can't remove remain inviolate.)

	It might be necessary to make 'pwd' set uid root too, this
can aviod "Can't get working directory" diagnostics from 'opr'.

	When there are files being printed, you may notice one more
copy of LPD in core than active printers. This extra process is the
big daddy LPD, that controls everything else.

	If any changes are made to /etc/printers while spooling
is in progress 'opctl -k' will cause LPD to take note of the changes,
but they will not become effective until the spool job completes
if there is a job current on the effected printer. That job may also be
zapped, or stopped, or returned to the queue. Note: aborting,
pausing, or reprinting will not do (unless an abort just happens to end
the job completely).

Known Bugs:
	Lpd has been observed (once for sure, twice possibly) to get
its knickers in a knot waiting for a child that just doesn't exist (the
frustrated spinster syndrome). In such a situation it should still print
any output that comes along, but it certainly chews up a hell of a lot
of system time.
	The queuing method is not very intelligent (just first come, or
at least it is meant to operate that way) - it really ought to depend on
size and number of copies as well. There used to be a version that took
size into account (you will probably find remnants of it in the code)
but it wasn't coded very well, and took an eternity to decide what to print
if the queues got large (and increased exponentially).
	There should probably be a repository for spooled output on each
of the mounted discs - links could be made much more often ('df' files
would still go in the standard spool directory). I haven't done this as
the majority of spooled output on our system comes from pipes, and it
isn't easy linking to a pipe, no matter what filesystem you try it on.
	Really unrelated to lpd, but worth mentioning here anyway - there
appears to be a bug in UNIX / the lock device driver that sometimes makes
it impossible to open the lock even though no-one else is really using it
(ie: the last close of the lock got lost somewhere in the system). This
causes lpd to think there is another version of itself somewhere, and just
exit - nothing gets printed. To avoid this, we just have two locks, when
one jams we 'mv' it somewhere and 'mv' the other one in. The system really
ought to be fixed, but this is only an illustration of a major problem
with signals and device drivers for which there is no easy fix known to me.

	Good Luck
		Robert Elz
		Melb Uni
		Comp Sci
