> From [EMAIL PROTECTED] Thu Feb 21 11:03:53 2002
> Date: Thu, 21 Feb 2002 12:58:20 -0500 (EST)
> From: Kevin Degnan <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: LPRng: wildcard?
>
> Hey everyone,
>
> I'm working in a Solaris environment and I'm trying to do the same
> thing that Gretchen is attempting: an enterprise-wide print service
> with a central LPRng server. I also wanted to use a simple printcap
> for all clients that forwards all print jobs to the print server via a
> single wildcard entry. In LPRng version 3.8.2 and earlier, this
> works great - clients would simply send the job to the server every
> time. If the printer existed, it printed successfully; if the printer
> did not exist, it sent an error message back to the client (this is
> what I wanted). Another reason I liked this approach is that it
> worked with lpstat -d, so I could also set a default printer for each
> system in /etc/lpd.conf.
>
> The problem is that this stopped working in versions 3.8.3 and later
> (including the latest 3.8.6). It simply does not want to resolve the
> wildcard. If I specify the printer on the command line (lp -d...), it
> works, but I would prefer to avoid this approach rather than educate
> all my users to do it this way. I tried Mohamed's suggestion but
> unfortunately it did not work; instead, it just tried to print to a
> printer named "lp", which of course failed.
>
> If someone has any advice, that would be great. Otherwise, I'll just
> stick with version 3.8.2 for now.
>
> Thanks in advance,
> Kevin
OK OK, I found the problem. It felt really stupid when I found it.
The LPRng stuff reads the printcap file and then builds up a list
of printers (All_printer[]). The code was putting the wildcard
('*') entry into this list. However, this is NOT a real printer,
so it should NOT be put into the list.
This is now fixed. However, there is an interesting side effect,
depending on the order that you put the wildcard:
Printcap:
lp|*:lp=%Q@host:client
lpq -Pxx -> conects to host, requests 'xx' status
lpq -> conects to host, requests 'lp' status
*|lp:lp=%Q@host:client
lpq -Pxx -> conects to host, requests 'xx' status
lpq -> no printer specified, runs down list of 'primary'
printer entries, does not find one. So
it uses the default, i.e. - first non-wildcard
primary, and since there is none, fails horribly.
I don't know if this matters to most folks, just make
sure that you have a default or accept failure in lookup.
i.e.
def:...
*|lp:lp=%Q@host:client
lpq -> uses the 'def' entry
*|lp:lp=%Q@host:client
def:...
lpq -> uses the 'def' entry
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)
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------