LPADMIN(C) XENIX System V LPADMIN(C)
Name
lpadmin - Configures the lineprinter spooling system.
Syntax
/usr/lib/lpadmin -pprinter [options...]
/usr/lib/lpadmin -xdest
/usr/lib/lpadmin -d[dest]
Description
lpadmin configures the lineprinter spooling system 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.
System managers may also use lpinit(C) to add new printing
destinations to the system. lpadmin may not be used when
the lineprinter scheduler, lpsched(C), is running, except
where noted below.
Exactly one of the -p, -d, or -x 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 option may be used when
lpsched(C) is running. No other 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 options are allowed with -x.
-pprinter Names a printer to which all of the options
below refer. If printer does not exist then
it will be created.
The following 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 option is assumed when
Page 1 (printed 8/7/87)
LPADMIN(C) XENIX System V LPADMIN(C)
creating a new printer unless the -l 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 lineprinter
scheduler, lpsched(C), disables all login
terminals automatically each time it is
started. Before re-enabling p, its current
device should be established using lpadmin.
-mmodel The model printer interface program, dumb, is
supplied with lineprinter software. It is a
shell procedure which interfaces lpsched(C)
and print devices. It can be found in the
directory /usr/spool/lp/model and may be used
as is with lpadmin -m or lpinit(C). This
program is an interface for a line printer
without special functions and protocol. Form
feeds are assumed. System managers may
modify copies of dumb and then use lpadmin -i
to associate the copies with printers.
-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 system manager, lp. Note
that there is nothing to stop a system
manager from associating the same device with
more than one printer. If only the -p and -v
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 shell procedures which
interface between lpsched(C) and devices. 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 & bin, or 664 permission if owned by bin & bin. System
Page 2 (printed 8/7/87)
LPADMIN(C) XENIX System V LPADMIN(C)
managers may modify copies of models and then use lpadmin -i
to associate them with printers. If printers have special
options, these can be included in the interface program.
Users can then choose an option with the lp -o command.
One model interface program is supplied with lineprinter
software: dumb. This is an interface program for a
lineprinter without special functions and protocol. Form
feeds are assumed. This is a good model for system managers
to copy and modify.
Serial printers that need delays or other special stty(C)
options (such as maping CR to newline) should have this
string included in the model interface program:
stty [ options ... ] 0<&1
Files
/usr/spool/lp/*
See Also
accept(C), enable(C), lp(C), lpinit(C), lpsched(C),
lpstat(C)
Page 3 (printed 8/7/87)