Hacking the SYSV Spooler.
Greg Woods
woods at gpu.utcs.toronto.edu
Fri Sep 2 14:01:11 AEST 1988
In article <750 at imtec.co.uk> russell at imtec.co.uk (Russell Brown) writes:
>Please correct me if I am wrong (sure someone will :-) but I can't find
>any simple way to support different types of stationary under the
>System V spooler.
>
[exact definition of problem deleted]
Use printer queue "classes". I've often seen the queue class type used
to specify printer types (ie: dotmatrix, line, laser), or to specify
priorities (ie: now, pm, low). There is no reason why the printer class
could not be used to specify form type. Either a printer name, or class
may be specified as an option to the lp command.
The commands enable and disable will allow you to specify what type of
form is currently loaded. Accept and reject can also be used for longer
term availability.
>To make this workable, a number of tools will be required to
>interrogate the queues, tell the spooler we are about to change the
>paper and detect that the spooler has stopped output.
A bunch of shell scripts that call enable, disable, accept, reject, and
lpadmin could be written to control the currently loaded paper type,
document the class names, add new form types, and such would make this a
user-friendly scheme. However, an experiences superuser should have no
trouble without. A simple cron deamon could let the system
administrator know that there are an abundance of jobs waiting in a
particular queue. Mind you, most administrators aren't always available
to change paper and re-configure the spooler! They've often got more
important things to do -- like fixing bugs in all the free software they
get off the net :-).
[ I have responded on the net because I have previously answered a lot
of questions about the Sys V lp spooler. I don't think many people have
looked at the full capablilty of this almost unique spooler. The
front-end commands above give it a tremendous degree of flexibility at a
very low cost. By writing appropriate interface scripts for the
"back-end", the lp spooler can be used for many types of batch
applications. ]
--
Greg Woods.
UUCP: utgpu!woods, utgpu!{ontmoh, ontmoh!ixpierre}!woods
VOICE: (416) 242-7572 [h] LOCATION: Toronto, Ontario, Canada
More information about the Comp.unix.questions
mailing list