lpadmin(1M) lpadmin(1M)
NAME
lpadmin - configure the LP spooling system
SYNOPSIS
/usr/lib/lpadmin -pprinter [-cclass] [-eprinter] [-h]
[-iinterface] [-l] [-mmodel] [-rclass] [-vdevice]
/usr/lib/lpadmin -xdest
/usr/lib/lpadmin -d[dest]
DESCRIPTION
lpadmin configures LP spooling systems to describe printers,
classes and devices. It is used to add and remove
destinations, change membership in classes, change devices
for printers, change printer interface programs and to
change the system default destination. lpadmin may not be
used when the LP scheduler, lpsched(1M), is running, except
where noted below.
Exactly one of the -p, -d or -x flag options must be present
for every legal invocation of lpadmin.
-d[dest] makes dest, an existing destination, the new
system default destination. If dest is not
supplied, then there is no system default
destination. This flag option may be used
when lpsched(1M) is running. No other flag
options are allowed with -d.
-xdest removes destination dest from the LP system.
If dest is a printer and is the only member
of a class, then the class will be deleted,
too. No other flag options are allowed with
-x.
-pprinter names a printer to which all of the flag
options below refer. If printer does not
exist then it will be created.
The following flag options are only useful with -p and may
appear in any order. For ease of discussion, the printer
will be referred to as P below.
-cclass inserts printer P into the specified class.
Class will be created if it does not already
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 flag option is assumed
Page 1 (last mod. 1/15/87)
lpadmin(1M) lpadmin(1M)
when creating a new printer unless the -l
flag option is supplied.
-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 software (see ``Models''
below).
-rclass removes printer P from the specified class.
If P is the last member of the class, then
the class will be removed.
-vdevice associates a new device with printer P.
device is the pathname of a file that is
writable by the LP administrator, lp. Note
that there is nothing to stop an
administrator from associating the same
device with more than one printer. If only
the -p and -v flag options are supplied, then
lpadmin may be used while the scheduler is
running.
Restrictions.
When creating a new printer, the -v option and one of the
-e, -i or -m options must be supplied. Only one of the -e,
-i or -m options may be supplied. The -h and -l keyletters
are mutually exclusive. Printer and class names may 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
software. They are shell procedures which interface between
lpsched and devices. All models reside in the directory
/usr/spool/lp/model and may be used as is with lpadmin -m.
Models should have 644 permission if owned by lp and bin, or
664 permission if owned by bin and bin. Alternatively, LP
administrators may modify copies of models and then use
lpadmin -i to associate them with printers. The following
list describes the models and lists the options which they
may be given on the lp command line using the -o keyletter:
Page 2 (last mod. 1/15/87)
lpadmin(1M) lpadmin(1M)
dumb interface for a line printer without special
functions and protocol. Form feeds are assumed.
This is a good model to copy and modify for printers
which do not have models.
1640 DIABLO 1640 terminal running at 1200 baud, using
XON/XOFF protocol. Options:
-12 12-pitch (10-pitch is the default)
-f do not use the 450(1) filter. The output has
been pre-processed by either 450(1) or the
nroff 450 driving table.
hp Hewlett-Packard 2631A line printer at 2400 baud.
Options:
-c compressed print
-e expanded print
prx Printronix P300 or P600 printer using XON/XOFF
protocol at 1200 baud.
EXAMPLE
1. Assuming there is an existing Hewlett-Packard 2631A line
printer named hp2, it will use the hp model interface
after the command:
/usr/lib/lpadmin -php2 -mhp
2. To obtain compressed print on hp2, use the command:
lp -dhp2 -o-c files
3. A DIABLO 1640 printer called st1 can be added to the LP
1 configuration with the command:
/usr/lib/lpadmin -pst1 -v/dev/tty20 -m1640
4. An nroff document may be printed on st1 in any of the
following ways:
nroff -T450 files | lp -dst1 -of
nroff -T450-12 files | lp -dst1 -of
nroff -T37 files | col | lp -dst1
5. The following command prints the password file on st1 in
12-pitch:
lp -dst1 -o12 /etc/passwd
Note: the -12 option to the 1640 model should never be
used in conjunction with nroff.
Page 3 (last mod. 1/15/87)
lpadmin(1M) lpadmin(1M)
FILES
/usr/lib/lpadmin
/usr/spool/lp/*
SEE ALSO
accept(1M), enable(1), lp(1), lpsched(1M), lpstat(1),
nroff(1).
Page 4 (last mod. 1/15/87)