> From [EMAIL PROTECTED] Thu Aug 24 05:29:17 2000
> Date: Thu, 24 Aug 2000 13:27:48 +0200
> From: Robin Sommer <[EMAIL PROTECTED]>
> To: David Ristau <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: LPRng: Need help with LPRng and NIS
>
>
> On Wed, Aug 23, 2000 at 14:50, David Ristau <[EMAIL PROTECTED]> wrote:
>
> [3.6.24]
> > Filterprintcap: filter '|/opt/LPRng/etc/printcap.filter' failed - No
> > such file or directory
>
> [3.6.12]
> > Can't match key all in map printcap.byname. Reason: no such key in map.
> >
> > Filterprintcap: filter process exited with status 1
>
> I think I can explain the different error messages as I've just run
> across a similar problem here.
>
> We use a similar script to get the printcap and it has run fine
> with 3.6.12. But after an update to 3.6.22 users got
>
> Filterprintcap: filter '|/opt/LPRng/etc/printcap.filter' failed - No such file
>or directory
>
> whenever they used a printer name that doesn't existed.
>
> Using the following printcap filter for testing, I've found the reason:
>
> #!/bin/sh
> read PRINTER
> echo "$PRINTER" >>/tmp/a
>
> 3.6.12:
>
> ----- cut ------------------------------------------------------------
> rsommer@andros [src] >>rm -f /tmp/a ; ./lpq -Pdoesnotexist > /dev/null ; cat /tmp/a
> doesnotexist
> ----- cut ------------------------------------------------------------
>
> 3.6.24:
>
> ----- cut ------------------------------------------------------------
> rsommer@andros [src] >>rm -f /tmp/a ; ./lpq -Pdoesnotexist > /dev/null ; cat /tmp/a
> doesnotexist
> *
> ----- cut ------------------------------------------------------------
>
> That means the script is called twice and the second time the given
> printer name is "*". And our script produced an error with that and
> without trying it I would assume that the script in the HOWTO has a
> similar problem.
>
> I've now fixed our script to handle this. But, Patrick, is lpq (and
> the other commands probably as well) supposed to call the filter
> twice? I haven't found anything like this in the CHANGES.
>
> Robin
>
> --
> Robin Sommer * private 05251/65041 * work 05251/60-3322
> Univers. of Paderborn * [EMAIL PROTECTED] * [EMAIL PROTECTED]
You can assume, without loss of generality, than any access function will
be called lebenty-leben times, where leben ranges from 1 to N, where N
is a value dependent on the whim the implementor.
Ummm.... That is professoreese for 'Yes.'
This '*' is a result of adding the 'wildcard' facility to LPRng. It first
checks to see if there is a 'specific' printcap entry, and then if there
isn't one, if there is a wildcard printcap entry.
It is left as an exercise for the student to see if their version of
ypmatch handles '*' as a key or a regular expression, and the modifications
of the script and construction.
You could, of course, add:
read key
if [ "$key" != '*' ] ; then
/path/to/ypmatch.... $key
fi
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------