Path: utzoo!lsuc!mnetor!utgpu!woods From: woods@gpu.utcs.toronto.edu (Greg Woods) Newsgroups: comp.unix.questions Subject: Re: Hacking the SYSV Spooler. Message-ID: <1988Sep2.000111.5299@gpu.utcs.toronto.edu> Date: 2 Sep 88 04:01:11 GMT References: <750@imtec.co.uk> Reply-To: woods@gpu.utcs.Toronto.EDU (Greg Woods) Organization: G. A. W. Consulting Lines: 44 Checksum: 22974 In article <750@imtec.co.uk> russell@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