Hi Reinhard,
I mentioned the same problem a long time ago but after a simple workaround
I forgot to follow it further on:
[printsrv2] ~ $ lpc printcap pubcp1
Printer: [EMAIL PROTECTED]
pubcp1|pubcp1d|dyecp1
:ab
:chooser=/usr/spool/lpd/bin/check_idle
:cm=Pha_7700 PS_2 4 A4 p (duplex paper), Operators, 5005
:du#16
:lpd_force_poll
:lpd_poll_time=60
:max_status_size=1
:mx#0
:sv=pubcp1a,pubcp1b
[printsrv2] ~ $ lpc printcap pubcp1a
Printer: [EMAIL PROTECTED]
pubcp1a
:ab
:bp=/usr/spool/filters/psbanner_pha7700
:cm=Pha_7700
:connect_timeout=2
:du#16
:filter=/usr/spool/filters/ifhp.loadbalance
-Tletter2a4,duplex,a4,autocolor
:force_localhost
:ifhp=model=phaser7700
:[EMAIL PROTECTED]
:lpd_bounce
:lpd_force_poll
:lpd_poll_time=60
:max_status_size=1
:mx#0
:ss=pubcp1
:suspend_of_filter
:translate_incoming_format=lf
[printsrv2] ~ $ cat /usr/spool/filters/ifhp.loadbalance
#!/bin/ksh
#exec 2>>/tmp/loadlog
#set -x
# This is a wrapper for the ifhp filter it corrects a bug in the
# loadbalancing queues. If there are multiple copys of the same
# job requested, just one job makes it into the slave queue, the
# original job stays in the server queue with an error flag
# chbeyer 07-01
# eval the given commandline options
# (see the HOWTO for the common options)
ARGS="$@"
while expr "$1" : '-.*' >/dev/null ; do
vAr=`expr "$1" : '-\(.\).*'`;
vAlue=`expr "$1" : '-.\(.*\)'`;
case "$vAr" in
- ) break;;
c ) c=1;;
[a-zA-Z] )
if test "X$vAlue" = "X" ; then shift; vAlue="$1"; fi;
eval $vAr='$vAlue';
#setvar $vAr "$vAlue"
;;
esac;
shift;
done
# check the controlfile for multiple copies
COPIES=`grep -c '^'N $k`
if test $COPIES -gt 1
# multiple copies are requested
then
# delete the control and datafile from the serverqueue
if test -a /usr/spool/lp/request/$Q/$e
then
rm /usr/spool/lp/request/$Q/$e
rm /usr/spool/lp/request/$Q/$k
# flush the cache for lpq requests
/usr/spool/lp/sbin/lpc flush $Q
fi
fi
# call the filter
/usr/spool/ifhp/libexec/filters/ifhp $ARGS
Hope this helps (?)
best regards
~christoph
--
/* Christoph Beyer | Office: Building 2b / 23 *\
* DESY | Phone: 040-8998-2317 *
* - IT - | Fax: 040-8998-4060 *
\* 22603 Hamburg | http://www.desy.de */
On Fri, 14 May 2004, Reinhard Zierke wrote:
> Hi,
>
> With LPRng version is 3.8.27 on Solaris 8, printing multiple copies
> through a load balancing queue does not work, only one copy of each file
> gets printed. The same happens when you 'lpc move' a job to another
> printer queue. Only one copy gets printed.
>
> My load balancing queue is d105_hp:
>
> rzdspc5a# lpc printcap d105_hp
> Printer: [EMAIL PROTECTED]
> d105_hp|d105_hp Generische HP Queue (D106)
> :lf=/var/log/lpd/d105_hp.log
> :mx#0
> :sd=/var/spool/lpd/d105_hp
> :server
> :sv=d105a_hp,d105b_hp
>
> After spooling three copies of the file /etc/motd into this queue:
>
> rzdspc5a# lpr -Pd105_hp -#3 /etc/motd
>
> the hf file /var/spool/lpd/d105_hp/hfA365 has three entries for the
> datafile:
>
> rzdspc5a# less /var/spool/lpd/d105_hp/hfA586
> hfdatafiles=copies=0x1^Bdftransfername=dfA586rzdspc5a.informatik.uni-hamburg.de^Bformat=f^BN=/etc/motd^Bsize=59^Acopies=0x1^Bdftransfername=dfA586rzdspc5a.informatik.uni-hamburg.de^Bformat=f^BN=/etc/motd^Bsize=59^Acopies=0x1^Bdftransfername=dfA586rzdspc5a.informatik.uni-hamburg.de^Bformat=f^BN=/etc/motd^Bsize=59^A
>
> But when the file gets moved to the subqueue d105a_hp, the
> the hf file /var/spool/lpd/d105a_hp/hfA365 has only one copy of this file
> left:
>
> rzdspc5a# less /var/spool/lpd/d105a_hp/hfA586
> ...
> hfdatafiles=copies=0x1^Bdftransfername=dfA586rzdspc5a.informatik.uni-hamburg.de^Bformat=f^Bsize=59^A
> ...
>
> it seems the code for moving print jobs into a new queue doesn't read
> the hfdatafiles entry from the old queue's hf file but merely copies the
> datafiles into the new queue and builds a new hfdatafiles entry for the
> new queue's hf file with a copy counter of 1 for each datafile.
>
> Reinhard
>
> --
> Reinhard Zierke Universit�t Hamburg, FB Informatik
> [EMAIL PROTECTED] Vogt-K�lln-Stra�e 30, D-22527 Hamburg
> [EMAIL PROTECTED] Tel.: (040) 42883-2295/2276 Fax: -2241
>
>
-----------------------------------------------------------------------------
> 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.
-----------------------------------------------------------------------------