This file is indexed.

/usr/share/doc/lprng-doc/LPRng-Reference-Multipart/x3699.htm is in lprng-doc 3.8.A~rc2-3.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta name="generator" content=
  "HTML Tidy for HTML5 for Linux version 5.2.0">
  <title>Routing Jobs To Print Queues</title>
  <meta name="GENERATOR" content=
  "Modular DocBook HTML Stylesheet Version 1.79">
  <link rel="HOME" title=" LPRng Reference Manual" href=
  "index.htm">
  <link rel="UP" title="Print Spooling Tutorial " href=
  "tutorial.htm">
  <link rel="PREVIOUS" title=
  "Load Balance Queues and Printer Pools" href="x3593.htm">
  <link rel="NEXT" title="Job Options and the Z Control File Entry"
  href="x3772.htm">
</head>
<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#840084" alink="#0000FF">
  <div class="NAVHEADER">
    <table summary="Header navigation table" width="100%" border=
    "0" cellpadding="0" cellspacing="0">
      <tr>
        <th colspan="3" align="center">LPRng Reference Manual: 24
        Sep 2004 (For LPRng-3.8.28)</th>
      </tr>
      <tr>
        <td width="10%" align="left" valign="bottom"><a href=
        "x3593.htm" accesskey="P">Prev</a></td>
        <td width="80%" align="center" valign="bottom">Chapter 4.
        Print Spooling Tutorial</td>
        <td width="10%" align="right" valign="bottom"><a href=
        "x3772.htm" accesskey="N">Next</a></td>
      </tr>
    </table>
    <hr align="left" width="100%">
  </div>
  <div class="SECT1">
    <h1 class="SECT1"><a name="AEN3699" id="AEN3699">4.18. Routing
    Jobs To Print Queues</a></h1>
    <p>A <span class="emphasis"><i class="EMPHASIS">routing
    queue</i></span> is similar in concept to a load balance queue
    in that it transfers a job to a (different) print queue, but
    the job destination is chosen at the time the job is submitted
    to the queue rather than at the time the job is removed from
    the queue. A routing queue can modify the job control file,
    multiple copies of the same job can be sent to the same or
    different printers, and the job can be held, rejected, or
    processed immediately.</p>
    <p>Edit the printcap file so it have the contents indicated
    below, create the <tt class="FILENAME">/tmp/lp2</tt> and
    <tt class="FILENAME">/tmp/lp3</tt> files with <tt class=
    "LITERAL">0777</tt> permissions. Create the <tt class=
    "FILENAME">/tmp/router.script</tt> with the contents indicated
    below, and give it <tt class="LITERAL">0755</tt> (executable)
    permissions. Use <tt class="COMMAND">checkpc -f</tt> to check
    the printcap, and then use <tt class="COMMAND">lpc reread</tt>
    to restart the <b class="APPLICATION">lpd</b> server.</p>
    <div class="INFORMALEXAMPLE">
      <a name="AEN3712" id="AEN3712"></a>
      <pre class="SCREEN"># printcap
lp:force_localhost
lp:server
  :lp=/dev/null
  :sd=/var/spool/lpd/%P
  :router=/tmp/router.script
lp2:force_localhost
lp2:server
  :sd=/var/spool/lpd/%P
  :lp=/tmp/lp2
lp3:force_localhost
lp3:server
  :sd=/var/spool/lpd/%P
  :lp=/tmp/lp2

# /tmp/router.script

#!/bin/sh
/bin/cat &lt;&lt;EOF
dest lp2
copies 2
Cred
end
dest lp3
end
EOF
exit 0</pre>
    </div>
    <p>The <tt class="FILENAME">router.script</tt> will write the
    routing information to its <acronym class=
    "ACRONYM">STDOUT</acronym>. For our example, we want the
    destination <tt class="LITERAL">lp2</tt> to get two copies of
    the job and we want to change the class to <tt class=
    "LITERAL">red</tt>. Now run the following commands:</p>
    <div class="INFORMALEXAMPLE">
      <a name="AEN3719" id="AEN3719"></a>
      <pre class="SCREEN"><samp class=
      "PROMPT">h4: {282} % </samp><kbd class=
      "USERINPUT">lpc stop all</kbd>
Printer: lp@h4
lp@h4.private: stopped
Printer: lp2@h4
lp2@h4.private: stopped
Printer: lp3@h4
lp3@h4.private: stopped
<samp class="PROMPT">h4: {283} % </samp><kbd class=
"USERINPUT">lpq</kbd>
Printer: lp@h4 (dest lp@localhost) (printing disabled) (dest lp2, lp3)
 Queue: no printable jobs in queue
Printer: lp2@h4  (printing disabled)
 Queue: no printable jobs in queue
Printer: lp3@h4  (printing disabled)
 Queue: no printable jobs in queue
<samp class="PROMPT">h4: {284} % </samp><kbd class=
"USERINPUT">lpr /tmp/hi</kbd>
<samp class="PROMPT">h4: {285} % </samp><kbd class=
"USERINPUT">lpq</kbd>
Printer: lp@h4 (dest lp@localhost) (printing disabled) (dest lp2, lp3)
 Queue: 1 printable job
 Server: no server active
 Rank   Owner/ID           Class Job Files        Size Time
1      papowell@h4+235       A   235 /tmp/hi         3 16:14:22
 -          papowell@h4+235.1       -&gt;lp2 &lt;cpy 0/2&gt;
 -          papowell@h4+235.2       -&gt;lp3
Printer: lp2@h4  (printing disabled)
 Queue: no printable jobs in queue
Printer: lp3@h4  (printing disabled)
 Queue: no printable jobs in queue</pre>
    </div>
    <p>The status reported for the spooled job indicates that the
    job is routed to <tt class="LITERAL">lp2</tt>, and that two
    copies will be sent. The <tt class="LITERAL">:destinations</tt>
    option in the printcap entry causes <b class=
    "APPLICATION">lpq</b> to display the contents of the specified
    queues. Now execute the following commands:</p>
    <div class="INFORMALEXAMPLE">
      <a name="AEN3733" id="AEN3733"></a>
      <pre class="SCREEN"><samp class=
      "PROMPT">h4: {286} % </samp><kbd class=
      "USERINPUT">lpc start</kbd>
Printer: lp@h4
lp@h4.private: started
<samp class="PROMPT">h4: {287} % </samp><kbd class=
"USERINPUT">lpq</kbd>
Printer: lp@h4 (dest lp@localhost) (destinations lp2, lp3)
 Queue: no printable jobs in queue
 Status: job 'papowell@h4+235' removed at 16:14:37.491
Printer: lp2@h4  (printing disabled)
 Queue: 2 printable jobs
 Server: no server active
 Rank   Owner/ID           Class Job Files        Size Time
1      papowell@h4+235.1C1   A   235 /tmp/hi         3 16:14:36
2      papowell@h4+235.1C2   A   236 /tmp/hi         3 16:14:37
Printer: lp3@h4  (printing disabled)
 Queue: 1 printable job
 Server: no server active
 Rank   Owner/ID           Class Job Files        Size Time
1      papowell@h4+235.2     A   237 /tmp/hi         3 16:14:37
<samp class="PROMPT">h4: {288} % </samp><kbd class=
"USERINPUT">more /var/spool/lpd/lp2/cfA235*</kbd>
Hh4.private
Ppapowell
J/tmp/hi
Cred
Lpapowell
Apapowell@h4+235.1C1
D2000-06-01-16:03:25.237
Qlp
N/tmp/hi
fdfA235h4.private
UdfA235h4.private</pre>
    </div>
    <p>As you can see, two copies of the job has been transferred
    to <tt class="LITERAL">lp2</tt> and one to <tt class=
    "LITERAL">lp3</tt>, each with a different job number, If we
    examine the control file for the jobs in the <tt class=
    "LITERAL">lp2</tt> spool queue, we will find that the
    <tt class="LITERAL">C</tt> or class information has been
    changed to <tt class="LITERAL">red</tt>.</p>
    <p>For details about all of the capabilities of the routing
    filter, see <a href="destinations.htm">Dynamic Routing</a>.
    Here is a summary of the information that the routing filter
    can put into the routing file.</p>
    <div class="VARIABLELIST">
      <dl>
        <dt>dest queue</dt>
        <dd>
          <p>Route this job to <tt class="LITERAL">queue</tt>. The
          <tt class="LITERAL">queue@host</tt> form will transfer
          the job to the queue on the named host.</p>
        </dd>
        <dt>copies N</dt>
        <dd>
          <p>Send N copies of this job to the destination.</p>
        </dd>
        <dt>priority C</dt>
        <dd>
          <p>Set the job priority letter to <tt class=
          "LITERAL">C</tt>, where C is a single upper case
          letter.</p>
        </dd>
        <dt>Cvalue</dt>
        <dd>
          <p>Set the control file line starting with <tt class=
          "LITERAL">C</tt> to <tt class="LITERAL">Cvalue</tt>.</p>
        </dd>
      </dl>
    </div>
    <p>The exit status of the routing filter controls how the job
    will be processed. If the exit code is JSUCC (0), then the job
    will be processed normally, JHOLD will hold the job until
    released, JREMOVE will remove the job, and so forth.</p>
  </div>
  <div class="NAVFOOTER">
    <hr align="left" width="100%">
    <table summary="Footer navigation table" width="100%" border=
    "0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="33%" align="left" valign="top"><a href=
        "x3593.htm" accesskey="P">Prev</a></td>
        <td width="34%" align="center" valign="top"><a href=
        "index.htm" accesskey="H">Home</a></td>
        <td width="33%" align="right" valign="top"><a href=
        "x3772.htm" accesskey="N">Next</a></td>
      </tr>
      <tr>
        <td width="33%" align="left" valign="top">Load Balance
        Queues and Printer Pools</td>
        <td width="34%" align="center" valign="top"><a href=
        "tutorial.htm" accesskey="U">Up</a></td>
        <td width="33%" align="right" valign="top">Job Options and
        the Z Control File Entry</td>
      </tr>
    </table>
  </div>
  <p align="center"></p>
</body>
</html>