I am AMAZED at what people come up with. I would NEVER have thought
about this...
> From [EMAIL PROTECTED] Fri Mar 1 16:06:54 2002
> Date: Sat, 2 Mar 2002 01:27:33 +0200 (EET)
> From: Tuomas Toropainen <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: LPRng: some weird bugs
>
> Hello list
>
> I'll start describing what i want to do. I want to have several queues on
> same physical printer, and i want the queues to process postscript jobs
> differently. For example, i want to have queue "lj5" which just forwards
> postscript to printer. Then i want to have second queue "lj5-2" on same
> printer, that prints 2 pages per sheet (pipes postsacript through mpage
> -2). And third queue that prints 4 pages per sheet (mpage -4), etc.
>
> I could setup different printcap entries for every queue, and i have done
> that and it works, but because it's same physical printer, the lpq -Plj5
> should display all jobs, and jobs should not interfere with each other,
> etc.
>
> Then, to bugs, or atleast, weird behaviour. I tried the following printcap
> entry:
>
> lj5|lj5-2|lj5-4
> :cm=Laserjet 5
> :lp=laserjet%9100
> :ifhp=model=%Q
> :tc=.global
>
> .global
> :sd=/var/spool/printers/%P
> :mx=0
> :rw
> :lf=log:af=acct
> :filter=/usr/libexec/filters/ifhp
>
> THING 1:
>
> ifhp=model= doesn't seem to accept %Q. If i print for example to lj5-2
> queue, "lpq -Pjl5 -L" tells me:
>
> Filter_status: using model 'lj5' at 01:01:58.590
>
> and uses appropriate options of lj5 entry from ifhp.conf file.
>
> If i change the first line of printcap entry to:
> lj5-2|lj5|lj5-4
> and print to lj5 queue (lpr -Plj5), lpq -Plj5 -L tells:
> Filter_status: using model 'lj5-2' at 01:04:43.259
> and uses appropriate options of lj5-2 entry from ifhp.conf file.
>
> I tried also %P, but it does exactly same thing.
BUG! Fixed in next release. Here is a patch:
*** common/linelist.c 2002/02/28 18:12:09 1.13
--- common/linelist.c 2002/03/02 18:25:12
***************
*** 2611,2616 ****
--- 2611,2622 ----
char *s;
DEBUG1("Make_passthrough: cmd '%s', flags '%s'", line, flags );
+ if( job ){
+ s = Find_str_value( &job->info,QUEUENAME, Value_sep );
+ if( !ISNULL(s) ){
+ Set_DYN(&Queue_name_DYN,s );
+ }
+ }
Init_line_list(&env);
if( env_init ){
Merge_line_list(&env,env_init,Value_sep,1,1);
>
>
> THING 2:
>
> This is ghost one. Uhh...
>
> In ifhp.conf i have one entry defining common options, called hp5m_oma
> (slightly customized from default hp5m, the hp5m printers i have played
> with dont tolerate any duplex relating commands, they don't have duplex
> units. Any duplex commands result to OffendingCommand error...but it's not
> important here) Then i have per queue entries, for example:
>
> [ lj5-2 ]
> tc=hp5m_oma
> ps_converter=/usr/bin/mpage -2 -b a4
>
> [ lj5-4 ]
> tc=hp5m_oma
> ps_converter=/usr/bin/mpage -4 -a -b a4
>
> Randomly, and especially with the mpage -4 entry, ifhp just ignores the
> ps_converter parameter. When normally lpq -L shows this kind of message:
>
> Filter_status: initial job type 'POSTSCRIPT' at 01:04:43.266
> Filter_status: decoded job type 'POSTSCRIPT' at 01:04:43.266
> Filter_status: job type 'POSTSCRIPT', converter '/usr/bin/mpage -2 -b a4'
> at 01:04:43.266
> Filter_status: started CONVERTER- 'mpage' at 01:04:43.268
> Filter_status: converter done, output 15521 bytes at 01:04:43.278
>
> and mpage does what it's supposed to, then sometimes it looks like this:
>
> Filter_status: initial job type 'POSTSCRIPT' at 00:34:04.938
> Filter_status: decoded job type 'POSTSCRIPT' at 00:34:04.938
> Filter_status: job type 'POSTSCRIPT' at 00:34:04.938
>
> and ifhp doesnt run mpage. Then, i pull ifhp.conf back to vi, don't
> necessarily even do any editing, save ifhp.conf, do /etc/init.d/lpd
> restart, and try printing again, and ifhp runs mpage as supposed to. What
> could cause this kind of thing....?
You have ^M at the ends of lines, perhaps?
Bad file? Gremlins? Leprecauns on a drunk?
When this happens, COPY the /etc/ifhp.conf file to a new location.
cp /etc/ifhp.conf /etc/ifhp.conf.evilfile
Now edit/change it as above. See if this works. If it does, do:
cmp /etc/ifhp.conf /etc/ifhp.conf.evilfile
If they are identical, buy a bottle of Tullamore Dew and execute
the following Dew loop:
while( concious ){
pour glass of Dew;
drink Dew;
}
Patrick ("Little Green Men? Those were mighty sick leprechauns alright") Powell
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.lprng.com)
>
>
> Well, if there exists better way of doing these queues with different
> ps_converter, i would greatly appreciate hints. The THING number 1
> prevents the configuration i thought (same printcap entry but different
> ifhp model) from working. Thing 2 is inconvenient but not fatal.
>
> I have been trying these using LPRng 3.8.8, compiled from src rpm
> LPRng-3.8.8-1.src.rpm, and ifhp from ifhp-3.5.5-1.src.rpm. The platform is
> RedHat 6.2.
>
> Hope i wrote everything important. If not, please ask. And please help
> with this thing...
>
>
> Best regards,
>
> Tuomas
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------