lpadmin(8) CLIX lpadmin(8)
NAME
lpadmin - Configures the LP spooling system
SYNOPSIS
/usr/lib/lpadmin -pprinter [flag ... ]
/usr/lib/lpadmin -xdest
/usr/lib/lpadmin -d[dest]
FLAGS
Exactly one of the -p, -d or -x flags must be present for every legal
invocation of lpadmin.
-pprinter Names a printer to which all of the flags below refer. If
printer does not exist then it will be created.
-xdest Removes destination dest from the system. If dest is a
printer and is the only member of a class, then the class will
be deleted, too. No other flags are allowed with -x.
-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 may be used when lpsched is
running. No other flags are allowed with -d.
The following flags 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. The class
option 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 is assumed when adding a new printer unless the -l
flag is supplied.
-iinterface Establishes a new interface program for P. The interface is
the pathname of the new program.
-l Indicates that the device associated with P is a login
terminal. The scheduler, lpsched, disables all login
terminals automatically each time it is started. Before
re-enabling P, its current device should be established
using lpadmin.
2/94 - Intergraph Corporation 1
lpadmin(8) CLIX lpadmin(8)
-mmodel Selects a model interface program for P. The model argument
is one of the model interface names supplied with the
Spooling Utilities. (See Models on the following page).
-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. The device is the
pathname of a file that is writable by lp. Note that the
same device can be associated with more than one printer.
If only the -p and -v flags are supplied, then lpadmin may
be used while the scheduler is running.
Restrictions.
When creating a new printer, the -v flag and one of the -e, -i or -m flags
must be supplied. Only one of the -e, -i or -m flags may be supplied.
The -h and -l flags 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 Spooling Utilities.
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. Copies of model interface programs may also be
modified and then associated with printers using lpadmin -i. The
following describes the models which may be given on the lp command line
using the -o flag:
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.
DESCRIPTION
The lpadmin command configures line printer (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. The lpadmin may not be used when the scheduler, lpsched, is
running, except where noted below.
EXAMPLES
1. Command string to specify that a DQP-10 printer named cI8, will use
the DQP-10 model interface:
/usr/lib/lpadmin -pcI8 -mdqp10
2 Intergraph Corporation - 2/94
lpadmin(8) CLIX lpadmin(8)
2. This string adds a LQP-40 printer called pr1 to the lp configuration:
/usr/lib/lpadmin -ppr1 -v/dev/contty -mlqp40
FILES
/usr/spool/lp/*
DIAGNOSTICS
The following diagnostic messages may be displayed when using the lpadmin
command:
can't create printer dev -- it is an existing printer
The specified printer already exists.
new printers require -v and either -e, -i, or -m
More information will have to be provided in order for the new
printer to be created.
requests still queued for printer -- use lpmove
A printer cannot be deleted if there are print requests pending.
EXIT VALUES
The lpadmin command returns with a value of 0 if the action was
successful; if the operation cannot be performed a value of 1 is returned.
RELATED INFORMATION
Commands: accept(8), lpsched(8), enable(1), lp(1), lpstat(1)
2/94 - Intergraph Corporation 3