I have noticed odd behavior with "as" option.

If I set "achk" and as=|/some/filter and the contents of filter
are

#!/bin/sh

exit 35


then the print job is aborted as expected.

However, if the filter is

#!/bin/sh

exit 0

then nothing happens. lpq shows that filter exited successfully but the
file is not printed for some reason. When I run lpq -lll, all I see is:

 Status: accounting at start at 15:22:37.770
 Status: Filter_file: pgm '|/home/akopps/bin/filter' exited with status 'JSUCC' at 
15:22:37.868
 Status: opening device 'paperjam%9100' at 15:22:37.868

and then it just sits there. Once I remove the "as" option or change
it to just a standard accounting file entry format, printing works
fine.  In future, I hope to create a filter script that checks the
quota database and if the user is over quota return error status
(which I assume the "as" entry was meant to use used for).  I tend to
think that this is LPRng bug. I have tested this on LPRng-3.2.26
running on Solaris 2.6 and it seems to work fine. Here is my printcap:

paperjam-test
        :cm=Printer
        :ifhp=model=hp4050
        :lp=paperjam%9100
        :of=/opt/local/packages/ifhp/libexec/filters/ifhp
        :if=/opt/local/packages/ifhp/libexec/filters/ifhp
        :sd=/var/spool/lprng/%P
        :as=|/home/akopps/bin/filter
        :ae=END
        :achk




-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to