Subject: Printing, BSD-style
To: None <port-arm32@netbsd.org>
From: Phillip Marsden <phillip.marsden@btinternet.com>
List: port-arm32
Date: 06/18/2002 19:22:50
Sorry to be such a nuisance on this mailing list.

I have a query about BSD printing. I have spent over 15 years as a sysadmin 
on System V Unix machines, but have not had the pleasure of using a BSD 
printing system very much. The Red Hat 7.1 system that I have used has a 
nice graphical front end which does all the dirty work. Likewise lpadmin on 
System V creates all the directories and files.

Reading several of the older Linux/Unix books in my possession I have 
created the directory structures for the printer named "brother" by hand. I 
actually got it working! I used the printcap entry created by the Red Hat 
system. The printer is connected to an Intel Netport Pro called marsden5, a 
small box with two parallel ports and a serial port, fed by a network 
cable. It acts as a Unix lpd printer server, and has been working with 
various Linux/Unix machines for about 5 years. It works to the Red Hat 
machine at the same time that the NetBSD ARM does not. It can be pinged 
from the RiscPC using NetBSD.

After my last enquiry about ppp dial-up, I wanted to print out some docs, 
and found that the printing system was no longer working. To cut a long 
story short, I spent the last day and a half with no success. If someone 
can point out the fault, I will be grateful. Perhaps I have altered 
something unwittingly, or perhaps another package installation has altered 
something.

When I try to print, I get the message: June 18 18:22:34 marsden5 lpd[218]: 
/dev/lp: No such file or directory
With exactly the same setup on the Red Hat machine, I get printed output.

There is no /dev/lp anywhere in the config files. There is no :lp=: setting 
in the Red Hat printcap. If I put :lp=/dev/null: in printcap, the output 
just disappears. If I put the name of an existing file here, it ends up in 
that file.

------------

The following is a list of directories, permissions, etc. I hope it will 
prove of some assistance in solving the problem.

permissions from / downwards
drwxr-xr-x  21  root  root       512 Jun 15 21:54 var
drwxr-xr-x  11  root  root       512 Aug 17 2001  spool
drwxrwxr-x   4  root  daemon  512 Jun 18 13:33 lpd
drwxrwx---   2  root  daemon  512 Jun 18 18:06 brother

-rw-r----x   1 root    daemon    4 Jun 18 18:06 .seq
-rw-rw----  1 root    daemon    0 Jun 11 11:35 acct
-rw-rw----  1 root    daemon    0 Jun 18 16:58 brother
-rw-rw----  1 root    daemon    0 Jun 11 11:36 control.brother
-rw-rw----  1 root    daemon    0 Jun 17 23:05 errs
-rw-rw----  1 root    daemon    4 Jun 18 18:13 lock
-rw-rw----  1 root    daemon    0 Jun 11 11:36 log
-rw-rw----  1 root    daemon    0 Jun 11 11:36 lpq.0
-rw-rw----  1 root    daemon    0 Jun 11 11:36 mf.cfg
-rw-rw----  1 root    daemon    0 Jun 18 17:56 status
-rw-rw----  1 root    daemon    0 Jun 11 11:36 status.brother
-rw-rw----  1 root    daemon    0 Jun 11 11:37 unspooler.brother

lpc restart brother error messages
brother:
         no daemon to abort
brother:
         daemon started
June 18 18:22:34 marsden5 lpd[218]: /dev/lp: No such file or directory

**************************
(This appears to show that the Netport has been requested to print to 
/dev/lp, but where has this request been set up?)
**************************

ps -ax shows that /usr/sbin/lpd is running


Contents of /etc/printcap

#       $NetBSD: printcap,v 1.6 2000/02/02 16:04:51 hubertf Exp $
#       from: @(#)printcap      8.1 (Berkeley) 6/9/93

# HP Laserjet driver for brother on Netport
brother:\
         :sh:\
         :ml=0:\
         :mx=0:\
         :sd=/var/spool/lpd/brother:\
         :rm=marsden5:\
         :rp=LPT1::\
         :lf=/var/spool/lpd/brother/errs:

marsden5 is an Intel Netport Pro
LPT1: is the name of the first parallel port to which the printer is connected

The permissions have been tried in various ways.
I have used lp instead of daemon, but to no avail.


-- 

Regards, Phillip Marsden.

phillip.marsden@btinternet.com