Some random ideas.
I don't know anything about ifhp or perl but:
My guess is that you are not finding the proper file name and exiting. The
error message is going to /dev/null, as specified in your printcap file. Try
making lp=/tmp/output. (with universal read and write permissions.)
If you are not using ifhp, why is it specified as a filter parameter in
/etc/printcap?
You don't know if your filter worked. There is no exit code given. The JSUCC
seems to relate to a banner filter or script. You need an exit 0 command in
your script, I believe.
You could put some debugging steps in your script, like echo Here I got >>
debug file or somesuch at several points in your script.
Are you sure all your environmental variables are as you think?
Use the equivalent of the set command in your script to perform the
following:
set > shellvariables
I don't understand the Getopt command. It looks different from the example
in my Perl book. (I don't use perl) Are you sure it is working and
returning the variables you think it is?
Joel


On Fri, Jan 18, 2002 at 04:15:42PM -0500, Robert Fausey wrote:
> I am running LPRng 3.7.4 and would like to use a perl script as a
> replacement filter for ifhp. The problem I am encountering is lpd is
> generating an error even when the script exits successfully.  I developed
> a test filter as a diagnostic tool which does nothing except for read
> from STDIN and writes to STDOUT.  I searched the list archives and my perl
> script appears to be using the correct syntax.  Has anyone encountered
> this problem before.
> 
> 
>  Status: waiting for subserver to exit at 16:03:09.558
>  Status: subserver pid 24224 starting at 16:03:09.699
>  Status: accounting at start at 16:03:09.699
>  Status: opening device '/dev/null' at 16:03:09.725
>  Status: printing job 'fausey@localhost+222' at 16:03:09.727
>  Status: creating banner at 16:03:09.728
>  Status: Filter_file: pgm '/var/local/LPRng/libexec/filters/cit.banner.sh' exited 
>with status 'JSUCC' at 16:03:10.606
>  Status: processing 'dfA222localhost.princeton.edu', size 61, format 'f', IF filter 
>'test-filter.pl' at 16:03:10.609
>  Status: IF filter 'test-filter.pl' filter finished at 16:03:11.488
>  Status: printing finished at 16:03:11.489
>  Status: test: Get_status_from_OF: LP, of_error 5 closed! - Bad file number at 
>16:03:11.489
>  Status: subserver pid 24224 exit status 'JABORT' at 16:03:11.555
>  Status: job 'cfA222localhost.princeton.edu' error 'aborting operations' at 
>16:03:11.556
>  Status: sending mail to '[EMAIL PROTECTED]' at 16:03:11.578
>  Status: removing job 'cfA222tatooine.princeton.edu' - ABORT at 16:03:12.391
> 
> 
> printcap:
> test
> :lp=/dev/null
> :sd=/var/local/LPRng/spool/lpd/%P
> :lf=/var/local/LPRng/spool/lpd/%P/log
> :bp=/var/local/LPRng/libexec/filters/cit.banner.sh
> :if=/var/local/LPRng/libexec/filters/test-filter.pl
> :filter=/var/local/LPRng/libexec/filters/ifhp
> :ab:ml=0:mx#0:mc=0:rw:bk
> 
> 
> test-filter.pl:
> #!/usr/bin/perl 
> 
> use Getopt::Std;
> 
> getopt( 'efPHnJCLADQNF0wxy' );
> open( FILE, "$opt_e" ) or die "Sorry could not open spool file $opt_e: $!\n";
> 
> while( <FILE> ) {
>     print $_;
> }
> 
> close( FILE );
> 
> #exit;
> 
> 
> Rob Fausey.
> 
> 
> 
> 
> 
> 
> 
> -----------------------------------------------------------------------------
> 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.
> -----------------------------------------------------------------------------

-----------------------------------------------------------------------------
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