HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 52

Removing a Printer from the lp Spooler

Page 52 highlights

Printers # lpshut 3. Create the printer class, specifying the printer you want to add to the class of printers. For example, to add a printer named laser 1 to the class of printers named laser, enter: # lpadmin -plaser1 -claser Only one printer can be added to a class at a time. If you have more than one printer to add, repeat this command. The lpadmin command can add a printer to a new class, add a printer to an existing class, or move a printer from one class to another class (a printer can only belong to one class). 4. Allow print requests to be accepted for the newly added printer class: # accept laser 5. Restart the LP spooler: # lpsched Removing a Printer from the lp Spooler You can use SAM or HP-UX commands to remove a printer from the lp spooler. SAM asks for confirmation before removing the printer. If there are print jobs in the printer's queue, or if the printer is the system default destination, SAM's confirmation message will include that information. If you choose to remove a printer that has jobs in its queue, SAM cancels those jobs. If you use HP-UX commands, follow these steps: 1. Become superuser with the su command or login as root. 2. (Optional.) Notify users that you are removing the printer from the system. 3. Remove the printer from the configuration file of any software application that can access the printer (refer to the documentation accompanying the software application for instructions). 4. Stop the lp spooler: # lpshut 5. (Optional.) Deny any further print requests for the printer: # reject -r"Use alternate printer." laser1 By performing this step, you can be assured that no new jobs will appear before you remove the printer. Users will see the message Use alternate printer when they direct requests to a rejected destination if the printer has not yet been removed. Once the printer has been removed, users trying to send a request will see the message Destination printer_name non-existent. 6. (Optional.) Determine if there are any jobs in the printer's queue. For example: # lpstat -o laser1 7. (Optional.) Disable the printer to be removed. For example: 47

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

Printers
47
# lpshut
3.
Create the printer class, specifying the printer you want to add to the class of printers.
For example, to
add a printer named
laser 1
to the class of printers named
laser
, enter:
# lpadmin -p
laser1
–c
laser
Only one printer can be added to a class at a time. If you have more than one printer to add, repeat this
command.
The
lpadmin
command can add a printer to a new class, add a printer to an existing class, or move a
printer from one class to another class (a printer can only belong to one class).
4.
Allow print requests to be accepted for the newly added printer class:
# accept laser
5.
Restart the LP spooler:
# lpsched
Removing a Printer from the lp Spooler
You can use SAM or HP-UX commands to remove a printer from the
lp
spooler. SAM asks for
confirmation before removing the printer. If there are print jobs in the printer±s queue, or if the printer is the
system default destination, SAM±s confirmation message will include that information. If you choose to
remove a printer that has jobs in its queue, SAM cancels those jobs.
If you use HP-UX commands, follow these steps:
1.
Become
superuser
with the
su
command or login as
root
.
2.
(Optional.)
Notify users that you are removing the printer from the system.
3.
Remove the printer from the configuration file of any software application that can access the printer
(refer to the documentation accompanying the software application for instructions).
4.
Stop the
lp
spooler:
# lpshut
5.
(Optional.)
Deny any further print requests for the printer:
# reject -r"Use alternate printer."
laser1
By performing this step, you can be assured that no new jobs will appear before you remove the printer.
Users will see the message
Use alternate printer
when they direct requests to a rejected destination if
the printer has not yet been removed. Once the printer has been removed, users trying to send a
request will see the message
Destination
printer_name non-existent
.
6.
(Optional.) Determine if there are any jobs in the printer±s queue. For example:
# lpstat -o
laser1
7.
(Optional.)
Disable the printer to be removed. For example: