Commit | Line | Data |
---|---|---|
a31f3663 WJ |
1 | .\" Copyright (c) 1983, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" @(#)lpd.8 6.6 (Berkeley) 3/16/91 | |
33 | .\" | |
34 | .Dd March 16, 1991 | |
35 | .Dt LPD 8 | |
36 | .Os BSD 4.2 | |
37 | .Sh NAME | |
38 | .Nm lpd | |
39 | .Nd line printer spooler daemon | |
40 | .Sh SYNOPSIS | |
41 | .Nm lpd | |
42 | .Op Fl l | |
43 | .Op Ar port# | |
44 | .Sh DESCRIPTION | |
45 | .Nm Lpd | |
46 | is the line printer daemon (spool area handler) and is normally invoked | |
47 | at boot time from the | |
48 | .Xr rc 8 | |
49 | file. It makes a single pass through the | |
50 | .Xr printcap 5 | |
51 | file to find out about the existing printers and | |
52 | prints any files left after a crash. It then uses the system calls | |
53 | .Xr listen 2 | |
54 | and | |
55 | .Xr accept 2 | |
56 | to receive requests to print files in the queue, | |
57 | transfer files to the spooling area, display the queue, | |
58 | or remove jobs from the queue. In each case, it forks a child to handle | |
59 | the request so the parent can continue to listen for more requests. | |
60 | .Pp | |
61 | Available options: | |
62 | .Bl -tag -width Ds | |
63 | .It Fl l | |
64 | The | |
65 | .Fl l | |
66 | flag causes | |
67 | .Nm lpd | |
68 | to log valid requests received from the network. This can be useful | |
69 | for debugging purposes. | |
70 | .It Ar "port#" | |
71 | The Internet port number used to rendezvous | |
72 | with other processes is normally obtained with | |
73 | .Xr getservbyname 3 | |
74 | but can be changed with the | |
75 | .Ar port# | |
76 | argument. | |
77 | .El | |
78 | .Pp | |
79 | Access control is provided by two means. First, all requests must come from | |
80 | one of the machines listed in the file | |
81 | .Pa /etc/hosts.equiv | |
82 | or | |
83 | .Pa /etc/hosts.lpd . | |
84 | Second, if the | |
85 | .Li rs | |
86 | capability is specified in the | |
87 | .Xr printcap | |
88 | entry for the printer being accessed, | |
89 | .Em lpr | |
90 | requests will only be honored for those users with accounts on the | |
91 | machine with the printer. | |
92 | .Pp | |
93 | The file | |
94 | .Em minfree | |
95 | in each spool directory contains the number of disk blocks to leave free | |
96 | so that the line printer queue won't completely fill the disk. | |
97 | The | |
98 | .Em minfree | |
99 | file can be edited with your favorite text editor. | |
100 | .Pp | |
101 | The daemon begins processing files | |
102 | after it has successfully set the lock for exclusive | |
103 | access (descibed a bit later), | |
104 | and scans the spool directory | |
105 | for files beginning with | |
106 | .Em cf . | |
107 | Lines in each | |
108 | .Em cf | |
109 | file specify files to be printed or non-printing actions to be | |
110 | performed. Each such line begins with a key character | |
111 | to specify what to do with the remainder of the line. | |
112 | .Bl -tag -width Ds | |
113 | .It J | |
114 | Job Name. String to be used for the job name on the burst page. | |
115 | .It C | |
116 | Classification. String to be used for the classification line | |
117 | on the burst page. | |
118 | .It L | |
119 | Literal. The line contains identification info from | |
120 | the password file and causes the banner page to be printed. | |
121 | .It T | |
122 | Title. String to be used as the title for | |
123 | .Xr pr 1 . | |
124 | .It H | |
125 | Host Name. Name of the machine where | |
126 | .Xr lpr | |
127 | was invoked. | |
128 | .It P | |
129 | Person. Login name of the person who invoked | |
130 | .Xr lpr . | |
131 | This is used to verify ownership by | |
132 | .Xr lprm . | |
133 | .It M | |
134 | Send mail to the specified user when the current print job completes. | |
135 | .It f | |
136 | Formatted File. Name of a file to print which is already formatted. | |
137 | .It l | |
138 | Like ``f'' but passes control characters and does not make page breaks. | |
139 | .It p | |
140 | Name of a file to print using | |
141 | .Xr pr 1 | |
142 | as a filter. | |
143 | .It t | |
144 | Troff File. The file contains | |
145 | .Xr troff 1 | |
146 | output (cat phototypesetter commands). | |
147 | .It n | |
148 | Ditroff File. The file contains device independent troff | |
149 | output. | |
150 | .It r | |
151 | DVI File. The file contains | |
152 | .Tn Tex l | |
153 | output | |
154 | DVI format from Standford). | |
155 | .It g | |
156 | Graph File. The file contains data produced by | |
157 | .Xr plot 3 . | |
158 | .It c | |
159 | Cifplot File. The file contains data produced by | |
160 | .Em cifplot . | |
161 | .It v | |
162 | The file contains a raster image. | |
163 | .It r | |
164 | The file contains text data with | |
165 | FORTRAN carriage control characters. | |
166 | .It \&1 | |
167 | Troff Font R. Name of the font file to use instead of the default. | |
168 | .It \&2 | |
169 | Troff Font I. Name of the font file to use instead of the default. | |
170 | .It \&3 | |
171 | Troff Font B. Name of the font file to use instead of the default. | |
172 | .It \&4 | |
173 | Troff Font S. Name of the font file to use instead of the default. | |
174 | .It W | |
175 | Width. Changes the page width (in characters) used by | |
176 | .Xr pr 1 | |
177 | and the text filters. | |
178 | .It I | |
179 | Indent. The number of characters to indent the output by (in ascii). | |
180 | .It U | |
181 | Unlink. Name of file to remove upon completion of printing. | |
182 | .It N | |
183 | File name. The name of the file which is being printed, or a blank | |
184 | for the standard input (when | |
185 | .Xr lpr | |
186 | is invoked in a pipeline). | |
187 | .El | |
188 | .Pp | |
189 | If a file can not be opened, a message will be logged via | |
190 | .Xr syslog 3 | |
191 | using the | |
192 | .Em LOG_LPR | |
193 | facility. | |
194 | .Nm Lpd | |
195 | will try up to 20 times | |
196 | to reopen a file it expects to be there, after which it will | |
197 | skip the file to be printed. | |
198 | .Pp | |
199 | .Nm Lpd | |
200 | uses | |
201 | .Xr flock 2 | |
202 | to provide exclusive access to the lock file and to prevent multiple | |
203 | deamons from becoming active simultaneously. If the daemon should be killed | |
204 | or die unexpectedly, the lock file need not be removed. | |
205 | The lock file is kept in a readable | |
206 | .Tn ASCII | |
207 | form | |
208 | and contains two lines. | |
209 | The first is the process id of the daemon and the second is the control | |
210 | file name of the current job being printed. The second line is updated to | |
211 | reflect the current status of | |
212 | .Nm lpd | |
213 | for the programs | |
214 | .Xr lpq 1 | |
215 | and | |
216 | .Xr lprm 1 . | |
217 | .Sh FILES | |
218 | .Bl -tag -width "/var/spool/*/minfree" -compact | |
219 | .It Pa /etc/printcap | |
220 | printer description file | |
221 | .It Pa /var/spool/* | |
222 | spool directories | |
223 | .It Pa /var/spool/*/minfree | |
224 | minimum free space to leave | |
225 | .It Pa /dev/lp* | |
226 | line printer devices | |
227 | .It Pa /dev/printer | |
228 | socket for local requests | |
229 | .It Pa /etc/hosts.equiv | |
230 | lists machine names allowed printer access | |
231 | .It Pa /etc/hosts.lpd | |
232 | lists machine names allowed printer access, | |
233 | but not under same administrative control. | |
234 | .El | |
235 | .Sh SEE ALSO | |
236 | .Xr lpc 8 , | |
237 | .Xr pac 1 , | |
238 | .Xr lpr 1 , | |
239 | .Xr lpq 1 , | |
240 | .Xr lprm 1 , | |
241 | .Xr syslog 3 , | |
242 | .Xr printcap 5 | |
243 | .Rs | |
244 | .%T "4.2 BSD Line Printer Spooler Manual" | |
245 | .Re | |
246 | .Sh HISTORY | |
247 | An | |
248 | .Nm | |
249 | daemon appeared in Version 6 AT&T UNIX. |