Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lpadmin(1M) — GL2 W2.5r1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

450(1)

accept(3N)

enable(1)

lp(1)

lpsched(1M)

lpstat(1)

LPADMIN(1M)  —  Silicon Graphics

NAME

lpadmin − configure the LP spooling system

SYNOPSIS

/usr/lib/lpadmin −pprinter [options]
/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 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(1M) 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 creating a new printer unless the −l option is supplied. 

−iinterface establishes a new interface program for P. Interface is the path name 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 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.  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:

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 don’t 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 printer using XON/XOFF protocol at 1200 baud. 

EXAMPLES

1.  To set up a printer class called usual that uses a dumb printer called fast which runs at 9600 baud X-on protocol on port /dev/ttyd2:
First, in single-user mode add the following commands to the /etc/rc file near where the daemons are set up:

sleep 10000000 < /dev/ttyd2&
sleep 3
stty 9600 ixon icanon < /dev/ttyd2&

 
Bring the system to multi-user mode and issue the following commands as root:

/usr/lib/lpadmin -pfast -mdumb -cusual -v/dev/ttyd2
/usr/lib/lpadmin -dusual
/usr/lib/accept usual
/usr/lib/accept fast
enable fast
/usr/lib/lpsched
lpstat -t

 
The configuration will be remembered after subsequent rebooting. To print the file /etc/passwd, issue the command:

lp /etc/passwd

2.  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

3.  To obtain compressed print on hp2, use the command:

lp  −dhp2  −o−c  files

4.  A Diablo 1640 printer called st1 can be added to the LP configuration with the command:

/usr/lib/lpadmin  −pst1  −v/dev/tty20  −m1640

5.  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

6.  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.

FILES

/usr/spool/lp/∗

SEE ALSO

450(1), accept(3N), enable(1), lp(1), lpsched(1M), lpstat(1). 

Version 2.5r1  —  October 29, 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026