Operating System - HP-UX
1825007 Members
2786 Online
109678 Solutions
New Discussion юеВ

restrict print queue access when special forms loaded

 
Elizabeth Laughlin
Occasional Contributor

restrict print queue access when special forms loaded

Is there any way to restrict access to a HP-UX print queue when special forms are loaded? Using fence only restricts by priority. I would like to be able to allow any print jobs that need that special "form" paper, but queue any that need regular paper. VMS has a way to do this but I've never seen a way with HP-UX.
3 REPLIES 3
Michael Tully
Honored Contributor

Re: restrict print queue access when special forms loaded

Hi,

The only way I've seen this done in the past
is to set up a different print queue for the
different types of paper being used to print
to same printer. What we used to do, was to
have all the print queues related to this
one printer 'disabled'. Once the correct
paper has been inserted and aligned (assuming
a line printer) was the correct queue then
enabled to run. I'm not sure of any other
method.

HTH
-Michael
Anyone for a Mutiny ?
Bill Hassell
Honored Contributor

Re: restrict print queue access when special forms loaded

This type of printer control is common in mainframes and commercial opsystems like MPE, but alas, nothing like this in HP-UX.

As mentioned, you can keep a special queue disabled all the time, then manually allow specific jobs to go through while inappropriate jobs are either deleted or transferrred to another printer. The deletion option does not require the spooler to be shutdown. It is real easy to always disable the queue: modify the printer script in the /etc/lp/interface directory (corresponding to the special forms printer) to always return a non-zero value. Each print job will be com-pleted and the print queue immiediately disabled.


Bill Hassell, sysadmin
Steven Sim Kok Leong
Honored Contributor

Re: restrict print queue access when special forms loaded

Hi,

I can only think of a workaround, that is to wrap the lp binary ie.

# cd /usr/bin
# cp -ip lp lp.bin
# vi lp

lp will thus be a wrapping script for lp.bin. In this script, check the file to be printed. Insert your conditions for special forms to be printed on specific printer queues.

Conditions can be anything from userids, printer queues, correct text (eg. pattern matches) in file to be printed.

Stub would be something like this:

#!/sbin/sh

if ... # conditions matched
then
/usr/bin/lp.bin $*
else
exit 1
fi

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com