Problems with berkeley spooler
A.V.Raman
A.Raman at massey.ac.nz
Fri Feb 15 13:50:25 AEST 1991
I'm setting up the berkeley spooler on our DEC station 3100 here
running ULTRIX 4.1.
I ran into a couple of problems in the process.
One of the entries I have in the printcap file looks like this:
lab2-1:\
:lp=/dev/null:\
:ct=network:\
:uv=psv1.0:\
:sh:\
:sd=/usr/spool/lab2-1:\
:af=/usr/adm/lp/acctlog.lab2-1:\
:lf=/usr/adm/lp/lab2-1.errs:\
:of=/usr/local/filters/HL-8.of %U %P a4bond %A:
1. The manual says that if the symbol "af" in printcap is defined, then
the "of" entry is ignored. Well, it isn't ignoring the "of" entry and
that's the way I want it. It's working fine with both 'af' and 'of'
in there. With ct=network, it passes 'af' to the output filter and
seems ideally suited for our accounging purposes. But I can't
understand what the manual means when it says that the 'of' entry will
be ignored.
2. When one of the filters prints an error message, (stderr) or exits with
a non-zero status, it does not seem to appear anywhere.
I started lpd with "lpd -l -L/usr/adm/lp/lpd.errs". But the lpd.errs
file seems to be empty. I tried using a space between the -L and the
filename; that didn't work either. Even the files specified in the
lf entry for that queue didn't have anything in them. There's nothing
in syslog relating to this. How does one find if the permissions on
the filters is wrong or if one of the filters failed fatally?
The permissions on the /usr/adm/lp directory are ok. The account files
get created without hassles. The syslog daemon was running at the time
I tested this.
The other major problem that I'm facing currently is that when I have
a pipe within the output filter, then the output filter seems to fail since
the program on the other end of the pipe reads eof rightaway.
For example, the output filter specified above has the lines
#! /bin/sh
$filters/HL-8.acct $* | rtelnet $2
then the rtelnet program receives nothing through the pipe.
If instead of the pipe, I have the following line in the output filter
$filters/HL-8.acct $* >>/tmp/file
it works fine, i.e., I find the output of HL-8.acct in /tmp/file
rtelnet by itself works fine. That is I can cat a file into rtelnet
$printer and it prints ok.
Why does the pipe in the script mess things up?
Any help via mail will be appreciated.
Thanks very much.
- Anand
More information about the Comp.unix.ultrix
mailing list