Sure, this is still bugging me and I'm eagerly awaiting a new release or
some kind of explaination how to solve this.

I know Patrick had some big project he was working on, but I belive he
said it was comming to an end. And after that he would continue the work
with LPRng... But, I haven't seen too much from him lately so.. I don't
know.. I just hope.

Max!



> Anyone else seeing this?  It's pretty annoying. :-/
> Subject: LPRng: BUG report/question about control file handling
> 
> Hello all,
> 
> 
> LPRng versions >3.7.1 seem to have problems passing extra control file
> parameters to filter command line. I think such problems make it
> impossible to use incoming_control_filter functionality. Although this
> kind of bug should be easily noticed, i couldnt find any info on this. I
> can best explain this by example, so here you are:  ("kalvo" is overhead
> transparency in finnish)
> 
> 
> -----------------START of example---------------
> 
> Printcap entry:
> testi|testi-2s|testi-a3|testi-a3-2s|testi-2s-a3
>         :cm=test printer
>         :incoming_control_filter=/usr/local/libexec/filters/update_z
>         :lp=/tmp/testi
>         :sd=/var/spool/printers/testi
>         :mx#0
>         :rw
>         :lf=log:af=acct
>         :filter=/usr/local/libexec/filters/testi-filter
> 
> 
> -----
> 
> 
> /usr/local/libexec/filters/update_z:
> #!/usr/bin/perl
> 
> ### 17.10.2000 psavola
> ### http://www.astart.com/LPRng/LPRng-HOWTO.html#INCOMINGCONTROLFILTER
> ### + minor typo corrections, modifications
> 
>     # update_z script:
>     # Determine the options according to the format of the queue name
>     #  Inspired by the psfilter code of Andreas Klemm
>     #  and Thomas Bueschgens
>     # First, get command line arguments
>     #
> 
> use Getopt::Std;
> my(%args,$Q,$Zopts,@file);
> getopts(
> "A:B:C:D:E:F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:" .
> "a:b:cd:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z:",
> \%args );
> # read stdin
> @file = <STDIN>;
> $Zopts = "";
>     # first use command line Queue name
>     $Q = $args{"Q"};
>     if( not $Q and (($Q) = grep(/^Q/,@file)) ){
>        # next use control file Queue name
>         chomp $Q if $Q;
>     }
>     # now we split up the name and use as parameters for Z options
>     while( $Q =~ /-([^-]+)/g ){
>         # you can add them or test and then add them
>         $Zopts .= ",duplex" if( $1 eq "2s" );
>         $Zopts .= ",a3" if( $1 eq "a3" );
>         $Zopts .= ",transparency" if( $1 eq "kalvo" );
>     }
> 
>     if( $Zopts ){
>         # remove leading comma
>         $Zopts = substr( $Zopts, 1 );
>         #replace or prefix Z options
>         if( not (grep { s/$/,$Zopts/ if /^Z/; } @file) ){
>             print "Z" . $Zopts . "\n";
>         }
>     }
>     print @file if( @file );
>     exit 0;
> 
> 
> -------
> 
> /usr/local/libexec/filters/testi-filter:
> #!/bin/sh
> # /tmp/testf - test filter for LPRng
> PATH=/bin:/usr/bin; export PATH
> echo TESTF $0 "$@"
> echo ENV
> set
> echo LEADER
> /bin/cat
> echo TRAILER
> exit 0
> 
> ----
> 
> $ lpr -Ptesti-2s test.txt
> 
> ----
> VERSION that has the bug
> 
> # lpd -V
> LPRng-3.7.4, Copyright 1988-2000 Patrick Powell, <[EMAIL PROTECTED]>
> 
> /tmp/testi:
> 
> TESTF /usr/local/libexec/filters/testi-filter -Atoropain@domain+68 -CA
> -D2001-03 -15-09:50:30.480 -Ff -Hdomain.csc.fi -Jtest.txt -Ltoropain
> -Ntest.txt -Ptesti -Qtesti-2s -Stest printer -aacct -b8
> -d/var/spool/printers/testi -edfA068domain.csc.fi -ftest.txt
> -hdomain.csc.fi -j068 -kcfA068domain.csc.fi -l66 -ntoropain -sstatus
> -t2001-03-15-09:50:30.000 -w80 -x0 -y0 acct
> 
> ENV
> BASH=/bin/sh
> BASH_VERSION=1.14.7(1)
> CONTROL=Zduplex
> Atoropain@domain+68
> CA
> D2001-03-15-09:50:30.480
> Hdomain.csc.fi
> Jtest.txt
> Ltoropain
> Ptoropain
> Qtesti-2s
> Ntest.txt
> fdfA068domain.csc.fi
> UdfA068domain.csc.fi
> 
> EUID=4
> HOME=/root
> HOSTTYPE=i386
> IFS=
> 
> LOGDIR=/root
> LOGNAME=root
> OPTERR=1
> OPTIND=1
> OSTYPE=Linux
> PATH=/bin:/usr/bin
> PPID=2071
> PRINTCAP_ENTRY=testi|testi-2s|testi-a3|testi-a3-2s|testi-2s-a3
>  :af=acct
>  :cm=test printer
>  :filter=/usr/local/libexec/filters/testi-filter
>  :incoming_control_filter=/usr/local/libexec/filters/update_z
>  :lf=log
>  :lp=/tmp/testi
>  :mx#0
>  :rw
>  :sd=/var/spool/printers/testi
> 
> PRINTER=testi
> PS4=+
> PWD=/var/spool/printers/testi
> SHELL=/bin/sh
> SHLVL=1
> SPOOL_DIR=/var/spool/printers/testi
> TERM=dumb
> UID=4
> USER=root
> _=ENV
> LEADER
> TESTING
> TRAILER
> 
> 
> -----------------------------
> 
> VERSION that works ok
> 
> # lpd -V
> LPRng-3.6.26, Copyright 1988-2000 Patrick Powell, <[EMAIL PROTECTED]>
> 
> 
> TESTF /usr/local/libexec/filters/testi-filter -Atoropain@domain+225 -CA
> -D2001-0 3-15-09:52:55.933 -Ff -Hdomain.csc.fi -Jtest.txt -Ltoropain
> -Ntest.txt -Ptesti -Qtesti-2s -Stest printer -Zduplex -aacct -b8
> -d/var/spool/printers/testi -edfA22 5domain.csc.fi -ftest.txt
> -hdomain.csc.fi -j225 -kcfA225domain.csc.fi -l66 -ntoropain -sstatus
> -t2001-03-15-09:52:55.000 -w80 -x0 -y0 acct
> 
> ENV
> BASH=/bin/sh
> BASH_VERSION=1.14.7(1)
> CONTROL=Zduplex
> Atoropain@domain+225
> CA
> D2001-03-15-09:52:55.933
> Hdomain.csc.fi
> Jtest.txt
> Ltoropain
> Ptoropain
> Qtesti-2s
> Ntest.txt
> fdfA225domain.csc.fi
> UdfA225domain.csc.fi
> 
> EUID=2
> HOME=/root
> HOSTTYPE=i386
> IFS=
> 
> LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
> LOGDIR=/root
> LOGNAME=root
> OPTERR=1
> OPTIND=1
> OSTYPE=Linux
> PATH=/bin:/usr/bin
> PPID=2228
> PRINTCAP_ENTRY=testi|testi-2s|testi-a3|testi-a3-2s|testi-2s-a3
>  :af=acct
>  :cm=test printer
>  :filter=/usr/local/libexec/filters/testi-filter
>  :incoming_control_filter=/usr/local/libexec/filters/update_z
>  :lf=log
>  :lp=/tmp/testi
>  :mx#0
>  :rw
>  :sd=/var/spool/printers/testi
> 
> PRINTER=testi
> PS4=+
> PWD=/var/spool/printers/testi
> SHELL=/bin/sh
> SHLVL=1
> SPOOL_DIR=/var/spool/printers/testi
> TERM=dumb
> UID=2
> USER=root
> _=ENV
> LEADER
> TESTING
> TRAILER
> 
> -----------------END of example---------------
> 
> Now, take a look at those filter command lines. In version 3.6.26 there is
> the -Zduplex command line option, which is missing in 3.7.4. Both control
> files have it identically as added by update_z script. But in 3.7.4 it has
> no real effect because ifhp seems only care about command line options,
> not those in CONTROL variable. (ie. with LPRng-3.7.4 the queue testi-2s
> doesnt print on both sides and with LPRng-3.6.26 it does as it should.)
> 
> Any comments? Has anyone else noticed this?
> 
> Please excuse any grammar errors :)
> 
> 
> 
> -----------------------------------------------------------------------------
> 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.
> -----------------------------------------------------------------------------
> 


 [EMAIL PROTECTED]  | [EMAIL PROTECTED]
 Ericsson Telecom                  | Tamira Konsult AB



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