Autoprint
automatic printer installation and accounting for HP Jetdirect and
Appletalk/Ethertalk based network printers in Solaris 2.x.

Gert Poletiek   gert@wins.uva.nl
Jan Wortelboer  janw@wins.uva.nl
Casper Dik	casper@wins.uva.nl then, now: casper.dik@sun.com

--

Installation instructions

Setting up the interface script

- copy the lp directory to /usr/local/lp, or whereever you want it.
  Note that server and client need access to that directory
  once the /etc/init.d/lp script installs the printer for you!

- Edit the /usr/local/lp/model/Makefile to correctly generate the
  printer interface script. 

- You may want to edit the model script. Especially the function
  printbanner which prints the optional customized banner page.

Printcap file

The printsystems re-introduces the /etc/printcap file to Solaris.
The script /etc/init.d/printers parses it and generates the correct
sysv printsystem commands to install and activate the printers. Anyone sane
will not want to remember those commands!

- Edit the /etc/printcap file for client and server. Samples are provided.


Printer quota

The interface script incorporates a crude monthly quota system.
You need to have pac installed as /usr/local/etc/pac to make it work.
The quota file is in /usr/local/lp/quota.<printer-name>. Only on the
printserver.  For the file format see the file quota.sample.

A user has a certain number of printable pages for any given month.
If used up, printjobs are refused. Unused quota from the previous month
are lost.

Setting up the client and server

- fill in remote hostname in client printcap file
- create logfiles on server according to contents of server printcap file
- enter server and client names in /etc/lp/Systems file

- copy the respective printcap files to /etc/printcap on client and server

  On client and server:
- install the printer script into /etc/init.d/printers 
- create HARD links at /etc/rc0.d/K19printers and /etc/rc3.d/S81printers to
  /etc/init.d/printers


Installing pac

- compile pac and install it.
  A Solaris 2.5 binary is included.

  Note that the interface script has /usr/local/etc/pac hardcoded in it.
  Change it if needed.

  You'll need this pac version for the printer quota to work.



Activating client and server

- run /etc/init.d/printers on client and server
  It will setup printers for you.
  Try printing, and try pac on the printer accounting file.


Success!
Gert
