Hi!

Since I was curious, I figured I could use the information from this
thread to try to program my own solution to my problem, as it seems
that the next release of LPRng might still take some time to come out.
In attempting to do this, I stumbled over the following issue:

>From http://www.lprng.com/LPRng-Reference/LPRng-Reference.html:
---snip---
4.2. Sample Printcap Entry
[...]
Here is another example of a printcap entry using the %P notation:

    lp:[EMAIL PROTECTED]

This entry will cause all jobs sent to the lp spool queue to be sent to
the lp queue on server. %X strings in the printcap entries are expanded
as shown: 
Key Replaced By 
%P printcap entry primary name (printer) 
%Q queue requested 
[...]
---snip---

To verify this, I did the following (including checkpc -fV to make sure
the dirs/perms are OK):

printcap:
bar|foo|*:\
  :lp=/dev/null:\
  :sd=/var/spool/lpd/foo:\
  :if=/usr/local/bin/test.pl %P %Q:\
  :la@:mx#0:\

test.pl:
#!/usr/bin/perl
$foo=`logger "test.pl has been called: @ARGV"`;

result in /var/log/messages (anonymized):
Apr 20 xx:xx:xx xxxxxxxxxx logger: test.pl has been called:
foo [EMAIL PROTECTED] -CA -Dxxxx-xx-xx-xx:xx:xx.xxx -Ff 
-Hxxxxxxxxxx.xxxx.xxxx -J/etc/samba/smb.conf -Lroot 
-N/etc/samba/smb.conf -Pfoo -Qfoobar -aacct -b5402 
-d/var/spool/lpd/foo -edfA644xxxxxxxxxx.xxxx.xxxx 
-f/etc/samba/smb.conf -hxxxxxxxxxx.xxxx.xxxx -j644 
-kcfA644xxxxxxxxxx.xxxx.xxxx -l66 -nroot -sstatus 
-txxxx-xx-xx-xx:xx:xx.xxx -w80 -x0 -y0 acct

What happened to %Q? Of course, seeing the output of @ARGV, I figured
that I can simply grep for -Q, but still I was wondering if I am
misunderstanding the documentation or if something is wrong here.

Patrick? 

Kind Regards, 
Stefan Baur

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