> > pr...:   <- printcap entry
> >   :incoming_control_filter=/usr/local/libexec/filters/fixhp
> now looks like this
> fleet2:
>         :lf=/var/log/lpd-errs
>         :rm=192.168.250.4
>         :rp=raw
>         :sd=/var/spool/lpd/fleet2
>         :mx#0:sh
>         :ff_separator
>         :lpd_bounce
>         :ifhp=model=hp5simx,status@
>         :filter=/usr/libexec/filters/ifhp
>       :incoming_control_filter=/usr/libexec/filters/fixhp 
>
>  
> > Put the following in the /usr/local/libexec/filters/fixhp file:
> I put it in /usr/libexec/filters/fixhp
> > 
> > #!/bin/perl
> > #  fix up the control file with HP options
> > #  Note that this must be done BEFORE processing the
> > #  control file
> > #
> > my(@file,@options,$options,$debug);
> > @file = <>;

OOPS!  Should have been:

    @file = <STDIN>;

> > print "file '" . join("','",@file) . "'\n" if $debug;
> > @options =
> >     grep /./,
> >     map { if(/^N O/){ $v= $_; chomp $v; $v =~ s/^N O//; $v; } else { "" } } @file;
> > print "option list '" . join("','",@options) . "'\n" if $debug;
> > $options = join(",",@options);
> > print "options '$options'\n" if $debug;
> > @file = grep !/^N /, @file;
> > print "new file '" . join("','",@file) . "'\n" if $debug;
> > if( $options ){
> >     if( not (grep { s/$/,$options/ if /^Z/; } @file) ){
> >             print "Z" . $options . "\n";
> >     }
> > }
> > print @file if @file;
> > exit 0;
> > 
>  Lets run through what "should" happen:
> >
> > The job arrives at the spooler.
> > The 'incoming_control_filter' program is run, producing the
> >   new control file.
> > The fixhp perl script will find all the 'N ' lines, extract
> > the options,  and then remove them.  It puts the
> > extracted 'N O' options into the Z line.
> >
> What really happens:
> the cf-file gets messed up or is empty
>
> the status file contains lines like these:
> INCOMING_CONTROL_FILTER: Can't open -A0: No such file or directory at
> 2000-08-10-12:24:39.360 ## A=0 number=0 process=12910
> INCOMING_CONTROL_FILTER: Can't open -j000: No such file or directory at
> 2000-08-10-12:24:39.363 ## A=0 number=0 process=12910
>
> OKAY, so why I'm not frustrated ?
> There is a Beta version LPRng-3.6.23beta2.tgz
>
> I installed it without adding the incoming control filter and it really
> works. Now all the -o options are nicely translated to -Z options even 
> without the :prefix stuff.
> Only problem - the df* job files are not removed from the spool dir.
>
> > Enjoy
> Yes, I did.
>
> So long, Philipp.

Hey,  thats why it is in the BETA section.

I have just repeated my tests and I do not get the same result.

Could you please remove the 'df' files that are currently in the
spool queue and rerun this?  I think they are left over from
an old job.  You should periodically run 'checkpc -r -A 7d' for this
reason.

Patrick

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