System V lp setup

Larry Lippman larry at kitty.UUCP
Sat Mar 7 15:07:02 AEST 1987


In article <343 at gssc.UUCP>, jdm at gssc.UUCP (John D. Miller) writes:
> i hereby cuss and swear vehemently at the UNIX System V (read 3B2) lp setup.
> more precisely, lpadmin and the whole /usr/spool/lp directory.

	I beg to differ.  I have used the Sys V lp spooler with excellent
results on three Sys V ports: AT&T for the 3B2, UniSoft Uniplus+, NCR for
the Tower XP and Tower 32.  I have written a variety of custom interface
programs for mechanical printers, the Xerox 4045 laser printer (like a 2700),
H-P plotters, and (believe it or not) a speech synthesizer and a robot, all
of which use the lp spooler to schedule jobs.

> when trying to bring up a new printer (a laserwriter) one cannot write a new
> model and stuff it in the .../lp/model directory and specify it as a new
> model.  it seems as though lpadmin is HARD CODED to a handful of not very
> useful model types.  

	No way is the model selection hard coded!  The model is chosen by the
``-m'' option of lpadmin(1M), and is selected from the files present in the
directory /usr/spool/lp/model.  You wanna create an interface program for a
new model to be selected by the ``-m'' option, just install your program in
this directory.
	If you want to install a new model program, you don't even have to
select from a pre-existing model; just use the ``-i [pathname]'' option of
lpadmin(1M) to install an interface program from a file kept anywhere on
your system!

> furthermore, if i delete the pstatus and qstatus files, i would expect that
> they would be recreated as necessary by SOME command, like lpadmin or even
> accept.  but they all complain that they can't open the file, or that the
> printer has "disappeared."

	In general, you should never mess with the pstatus and qstatus files.
If you have messed with them, and have screwed up the lp spooler, your best
bet is to save any custom interface programs, delete all of the files in
/usr/spool/lp, and re-install the lp spooler software.  If you have a 3B2,
this is simple process done by inserting the lp spooler distribution diskette,
and typing ``sysadm installpkg''.  Then you can use lpadmin(1M) to rebuild the
lp spooler.

> in short, lpadmin is a pain, and the System V manuals don't make it easier.
> i have NO documentation on the contents of the /usr/spool/lp directory (at
> least not that i know of, as all things are hard to find in the "new and
> improved" at&t manuals) except what is in the lpadmin man page.

	You say you have a 3B2.  With Sys V Release 1.x (which no one ought
be running anymore!), the "Line Printer Spooling Manual" 305-332 did a
decent job of explaining lp spooler operation, although it didn't explicitly
say much about the /usr/spool/lp file structure.  With Sys V Release 2.x,
the updated manual 305-430 was much improved and has a whole section that
explains the file and directory functions.  How can you be running a 3B2
with an lp spooler and NOT have these manuals?

> i think that my basic gripes boil down to this:  
> 	1. lpadmin should not be hardcoded with the model names, and
> 	2. the new System V manuals are AWFULL!!!!  the original, spiral-bound
> 	manuals were great, by comparison, except that they fell apart.  
> i vehemently oppose spreading the same information over MANY manuals.

	This is simply not true.  I beg to differ with your reference to
``MANY'' manuals.  There is one distributed manual, mentioned above.  That
is your lp spooler manual; you take the (1) and (1M) pages and put 'em the
appropriate (1) and (1M) manuals.  Period.
	I have lack-of-decent-documentation gripes against AT&T and Sys V
(like ipc and the graphics utilities), but it sure as hell ain't with the
lp spooler!

<>  Larry Lippman @ Recognition Research Corp., Clarence, New York
<>  UUCP:  {allegra|ames|boulder|decvax|rocksanne|watmath}!sunybcs!kitty!larry
<>  VOICE: 716/688-1231        {hplabs|ihnp4|mtune|seismo|utzoo}!/
<>  FAX:   716/741-9635 {G1,G2,G3 modes}    "Have you hugged your cat today?" 



More information about the Comp.unix.wizards mailing list