PRINTERS
* -| X
* X Printer2 -O
Printer1 * O
\ /
\ /
-------------------------
---------Terminal
COMPUTER
\\
|~~~~~~~~~~~~|
|~~~~~~~~~~~~|
| |
|~~~~~~~~~~~~|
| |
| |
OPTPR1
OPTIONS for lpadmin
-pprinter - Names a printer to which all the specified
options will refer!
-vdevice - Associates a new device with the printer p.
device is the pathname of a file that is writable
by the system manager, lp.
-iinterface - Establishes a new interface program for the
printer specified with p, interface
is the pathname of the new program.
-ddest - Makes the line printer with the name
dest the new system default destination.
OPTPR2
lpadmin OPTIONS:
-rclass - Removes a printer from the class of printers.
-cclass - Adds a printer to the class of printers
LNEXT
ONELCLEAN
UTERMINAL
TERMINAL
NEXT
$V1$
HILINE
PAUSE
q - to quit <CR> - to continue
GO
Because the state of your UNIX print spooling system
is dynamic, and because problems on the system do occur,
you need a way to reconfigure your printer system.
The UNIX command that allows you to do just that
is /usr/lib/lpadmin - for line printer administration.
The command lpadmin configures the line printer 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 change the system default destination.
Above are shown several options for the lpadmin command.
For greater detail see your UNIX User Guide.
Almost in all instances, prior to
using the lpadmin command, the
line printer scheduler lpsched must
be stopped; this is accomplished
by using the /usr/lib/lpshut
command. Please issue this command
at the prompt.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type /usr/lib/lpshut
Please type /usr/lib/lpshut
You will be helped this time!
FORGET1
/usr/lib/lpshut
Observe the result on the screen.
scheduler stopped
$PROMPT$
At this point you can use the
lpadmin command for configuration.
Let us get acquainted with some features of the lpadmin
command. At the prompt, enter the command that will add a printer
called pr2 that is connected to the device /dev/lp3
with the interface program dp7.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type lpadmin -ppr2 -v/dev/lp3 -idp7
Please type lpadmin -ppr2 -v/dev/lp3 -idp7
You will be helped this time!
FORGET6
lpadmin -ppr2 -v/dev/lp3 -idp7
$PROMPT$
At the prompt please enter the lpadmin command that will
add a printer called laser2 that is connected to the device
/dev/lp1, with the same interface program as the printer pr1.
The new printer will be a member of the class named cti!
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type lpadmin -plaser2 -v/dev/lp1 -epr1 -ccti
Please type lpadmin -plaser2 -v/dev/lp1 -epr1 -ccti
You will be helped this time!
FORGET2
lpadmin -plaser2 -v/dev/lp1 -epr1 -ccti
Note, the new printer would have to be
already defined as the special file
in the /dev directory!
Now please enter the command to
remove the printer estat from
the printer class cti (note
the additional lpadmin flags
above)!
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type lpadmin -pestat -rcti
Please type lpadmin -pestat -rcti
You will be helped this time!
FORGET3
lpadmin -pestat -rcti
A correct response would be followed
by the next prompt!
$PROMPT$
Each printer needs a correct
interface (control) program for
proper operation. The command to
assign the new interface program
/u/lp/clean for the printer
residing in the file print2 is:
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type
lpadmin -pprint2 -i/u/lp/clean
Please type
lpadmin -pprint2 -i/u/lp/clean
You will be helped this time!
FORGET4
lpadmin -pprint2 -i/u/lp/clean
$PROMPT$
A correct command would be followed
by the next prompt!
Finally, we have to restart the
printer scheduler. This can be
accomplished by rebooting the system
or (much easier), by using the
command /usr/lib/lpsched. Please
type this command at the prompt.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type /usr/lib/lpsched
Please type /usr/lib/lpsched
You will be helped this time!
FORGET5
/usr/lib/lpsched
$PROMPT$
You now need use lpstat -r to con-
firm that lpsched is running. If it
isn't, remove the file SCHEDLOCK from
the /usr/spool/lp directory. Then
remove the remaining print files
from the /usr/spool/lp/request dir-
ectory and reenter /usr/lib/lpsched