> From [EMAIL PROTECTED] Wed Aug 16 15:17:59 2000
> Date: Wed, 16 Aug 2000 23:03:00 +0200
> From: Thomas Emmel <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: LPRng: append_z and selecting a tray...
>
> Hello together, hello Patrick,
>
> I have upgraded from lprng 3.6.12 to 3.6.23 and found that new option
> "append_z" which is one of the things that should make life easier, but
> now I am confused somehow...
> Here are two printcaps, first for a client, second for the server:
> ----client----
> hp3:client:lp=%P@coulomb:force_localhost@
>  
> hp2:client:lp=%P@coulomb:force_localhost@
>  
> hp1:client:lp=%P@coulomb:force_localhost@
> ---end of client---

> ---server---

You should be using:

 # force clients to send job to server - they will not
 # fuss with options, etc.
 hp3:tc=.client
 hp2:tc=.client
 hp1:tc=.client
 hp:tc=.client
 .client:lp=%P@coulomb:force_localhost@

 # on server, these queue can do options
 hp3:server:tc=.hpx:append_z=tray3:cm=Schacht 3 - Altpapier
 hp2:server:tc=.hpx:append_z=tray2:cm=Schacht 2
 hp1:server:tc=.hpx:append_z=tray1:cm=seitlicher Einzug
 .hpx:
   :lp=%P@coulomb
   :sd=/var/spool/lpd/%P
 # and they get this
 hp:server:cm=HP Netzwerkdrucker (brahms)
   :filter=/usr/libexec/filters/ifhp
   :lpd_bounce
   :tc=.common
   :lp=130.83.237.53%9100
   :ifhp=model=hp5simx
   :if=/usr/local/libexec/filters/ifhp
  
 .common:
   :sh
   :mx=0
  
> :sd=/var/spool/lpd/%P                                                                
>                            
> ---end of server---
>
> The intention was to choose the tray with name of the queue
> and all works fine if we use "lpr -Php3 file" or  "lpr -Php3@coulomb
> file"
> on the client and "lpr -Php3@coulomb file" on the server.
> There will be an entry in the cf...-file: Z,tray3,tray3
> I don't know why lprng append ",tray" two times, but that is not the 
> problem.
> If I use "lpr -Php3 file" there is NO Z-entry at all!
> It seems that lprng sends the file directly to "hp" without appending
> anything and ignoring the hp3-queue-entries.
> If I use force_localhost@ or lpd_bounce nothing changes...
>
>
> ____________________________________________________________________
> Dipl.-Ing. Thomas Emmel
>
> TU Darmstadt: Inst. f. Mechanik (FB6) AG IV
>               Hochschulstr. 1,       64289 Darmstadt 
>               Tel.: +49 (6151) 16 49 66, FAX: +49 (6151) 16 30 18
> e-mail: [EMAIL PROTECTED]
> www   : http://coulomb.mechanik.tu-darmstadt.de/user/emmel
> ____________________________________________________________________

You can also do the following:

# client entry
hp|hp_*:lp=%Q@coulomb:qq

hp|hp_*:server:cm=HP Netzwerkdrucker (brahms)
   :incoming_control_filter=/usr/local/bin/libexec/filters/fixz
   :filter=/usr/libexec/filters/ifhp
   :lpd_bounce
   :tc=.common
   :lp=130.83.237.53%9100
   :ifhp=model=hp5simx
   :if=/usr/local/libexec/filters/ifhp

#!/usr/bin/perl
# fixz filter

use Getopt::Std;
my(%args);
# get the arguments
getopt(
    "a:b:cd:e:f:g:h:i:j:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z:" .
    "A:B:C:D:E:F:G:H:I:J:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:",
    \%args );
# get the queue that was used:
if( $args{'Q'} ){
        $Q = $args{'Q'};
} else {
        $Q = $args{'P'};
}

my(@lines);
@lines = <STDIN>;
if( $Q =~ /_1/ ){ $opts .= ",tray1"; }
if( $Q =~ /_2/ ){ $opts .= ",tray2"; }
if( $Q =~ /_3/ ){ $opts .= ",tray3"; }
($Zline) = grep /^Z/, @lines;
if( $Zline ){
        $Zline .= $opts;
        map s/^Z.*/$Zline/ @lines;
} else {
        unshift @lines, "Z$opts";
}

Patrick Powell                 Astart Technologies,
[EMAIL PROTECTED]            9475 Chesapeake Drive, Suite D,
Network and System             San Diego, CA 92123
  Consulting                   858-874-6543 FAX 858-279-8424 
LPRng - Print Spooler (http://www.astart.com)

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