Daniel E Singer on wrote...
| > It is rather simple. All the lpr -h flag does is remove the
| > "L" line from the control file being passed to the lpd server.
| >
| > As such the easy way to fix this is to add a
| > :incoming_control_filter={small postscript}
| >
| > that either removed the line starting with "L" or
| > is no line was present, add one by duplicating the "P" line
| > replacing the "P" with an "L".
| ...
|
| I finally got around to trying this particular solution ... and it
| does not work. Even if I successfully remove (or add) the "L" line in
| the cf* file (via :incoming_control_filter), the change that I make is
| not reflected in the hf* file, and it seems that the latter one is the
| one that lpd is actually paying attention to. For example, the line
|
| L=des
|
| is still in the hf* file (which is poorly documented in the
| LPRng-3.7.4 HOWTO), and the header still gets printed. If I stop the
| queue and edit the hf* file by hand to remove that line, *then* I
| don't get the header page. I wonder if this is "fixed" in a later
| LPRng version? I'd update LPRng if it weren't such a huge pain in the
| $*% to do...
|
| Thanks.
| -Dan
|
That is strange, hmmm...
Nope, on my system when I use the cf_filter to delete the "L" line
the file is removed from both the final "cf" file and the "hf" file.
Further my text to postscript filter noticed the missing "L" line and
remove its per page bannering. Note I have ":sh" permanently on, I
don't believe in the waste of paper it produces.
Here is an extract of the core of my filter...
=======8<--------
#!/usr/bin/perl
#
# LPRng Incomming Control File Filter
#
use strict;
use warnings;
$_ = join "", <STDIN>; # Read in control file
# Replace a novell usernames with the short form used under UNIX
s/^([APL])\.([^.\@\s]*)[^\@\s]*/$1$2/m;
# Lowercase usernames and hostnames fields
s/^([APLH])(.*)/$1.lc($2)/meg;
s/^L.*\s*//m;
print; # Output the result
# return success
exit 0;
=======8<--------
The full version does more, specifically IP conversion for
the :force_ipaddr_hostname printcap entry.
Anthony Thyssen ( System Programmer ) http://www.sct.gu.edu.au/~anthony/
-----------------------------------------------------------------------------
A novice practices until he gets it right.
An expert practices until he doesn't get it wrong.
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.sct.gu.edu.au/~anthony/
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------