LPADMIN(1M) SysV LPADMIN(1M)
NAME
lpadmin - configure the line printer (LP) spooling system
SYNOPSIS
/usr/lib/lpadmin -p printer [ options]
/usr/lib/lpadmin -x dest
/usr/lib/lpadmin -d [ dest ]
DESCRIPTION
lpadmin configures line printer (LP) spooling systems to describe
printers, classes, and devices. It adds and removes destinations,
changes class membership, changes printer devices, changes printer
interface programs, and changes system default destination. lpadmin
cannot be used when the LP scheduler, lpsched(1M), is running, except
where noted below.
OPTIONS
You must specify one of the -p, -x or -d options for each invocation of
lpadmin.
-pprinter Names a printer to which the options below refer. If printer
does not exist, it is created.
-xdest Removes destination dest from the LP system. If dest is a
printer and is the only member of a class, then the class is
also deleted. No other options are allowed with -x.
-d[dest] Makes dest, an existing destination, the new system default
destination. If you do not supply dest, there is no system
default destination. This option can be used when lpsched(1M)
is running. No other options are allowed with -d.
The following options can only be used with -p and can appear in any
order. For ease of discussion, the printer is referred to as P below.
-cclass Inserts printer P into the specified class. class is created
if it does not exist.
-eprinter Copies an existing printer's interface program to be the new
interface program for P.
-h Indicates that the device associated with P is hardwired. This
option is assumed when you add a new printer unless you specify
the -l option.
-iinterface
Establishes a new interface program for P. interface is the
pathname of the new program.
-l Indicates that the device associated with P is a login
terminal. The LP scheduler, lpsched, disables all login
terminals automatically each time it is started. Before re-
enabling P, its current device should be established using
lpadmin.
-mmodel Selects a model interface program for P. model is one of the
model interface names supplied with the LP spooling utilities.
-rclass Removes printer P from the specified class. If P is the last
member of the class, the class is removed.
-vdevice Associates a new device with printer P. device is the pathname
of a file that is writable by lp.
Restrictions
When you are creating a new printer, the -v option and one of the -e, -i
or -m options must be supplied. Only one of -e, -i or -m can be
supplied. The -h and -l keyletters are mutually exclusive. Printer and
class names can be no longer than 14 characters and must consist entirely
of the characters A-Z, a-z, 0-9 and _ (underscore).
Models
Model printer-interface programs are supplied with the LP spooling
utilities. They are shell procedures that interface between lpsched and
devices. All models reside in the directory /usr/spool/lp/model and can
be used as is with lpadmin -m. Copies of model interface programs can
also be modified and then associated with printers using lpadmin -i. The
following describes the models that can be listed on the lp command line
using the -o keyletter:
LQP-40
Letter quality printer using XON/XOFF protocol at 9600 baud.
DQP-10
Dot matrix draft quality printer using XON/XOFF protocol at 9600
baud.
NOTE
The same device can be associated with more than one printer. If only
the -p and -v options are supplied, lpadmin can be used while the
scheduler is running.
EXAMPLES
1. A DQP-10 printer named cI8, uses the DQP-10 model interface after the
command:
/usr/lib/lpadmin -pcI8 -mdqp10
2. A LQP-40 printer called pr1 is added to the lp configuration with the
command:
/usr/lib/lpadmin -ppr1 -v/dev/eexo1 -mlqp40
FILES
/usr/spool/lp/*
(a link to //lp_site/usr/spool/lp where spooling occurs)
SEE ALSO
accept(1M), lpsched(1M). enable(1), lp(1), lpstat(1)