Chapter 5 Configuring the Internal Ethernet Adapter for TCP/IP
170
4. Create a new queue device to do the one-to-one mapping with the
printer and specify the backend program for the qdaemon to send
print jobs to. Enter:
mkquedev -d lp0 -q queue2 -a ’backend = /usr/lib/lpd/piobe’
NOTE: Sometimes /usr/lib/lpd/piobe is the location of this backend
program.
5. Create a virtual printer. This associates the queue, queue device,
printer/plotter, name, data type, and printer/plotter type. Enter:
mkvirprt -q queue2 -d lp0 -n lp0 -s pcl -t hplj3
NOTE: -s is usually pcl but can also be ps (PostScript) or asc (ASCII).
This does not seem to affect the output of the printer, so it may
be best to use pcl.
6. Change the pio-file for your queue. This will be located in /usr/lib/
lpd/pio/custom and will be called queue2:lp0 after the queue and
queue device names. Change the line beginning with 302 mo::.
Enter:
307 mo::rsh spike lp -d d1prn
NOTE: This file is only created after the mkvirprt command has been
executed in step 5. This step redirects the print job over the
network to the Internal Ethernet Adapter.
7. Run chvirprt since the print setup has been altered and needs
updating. Enter:
chvirprt -q queue2 -d lp0
NOTE: If you need to delete an entire print setup, use the rmvirprt
command.
This is the /etc/qconfig entry created for this particular setup:
queue2: queue stanza
device = lp0 by mkquedev (queue
device)
up = TRUE printer’s ready to go
lp0: queue device stanza
backend=/user/lib/lpd/piobe for local printing