File: lpsimulation.htm

package info (click to toggle)
lprng 3.8.10-1.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 13,076 kB
  • ctags: 4,348
  • sloc: ansic: 35,394; sh: 10,756; perl: 2,210; makefile: 1,046
file content (174 lines) | stat: -rw-r--r-- 6,651 bytes parent folder | download
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org">
    <title>Emulation for UNIX SystemV lp and lpstat</title>
    <meta name="GENERATOR" content=
    "Modular DocBook HTML Stylesheet Version 1.71 ">
    <link rel="HOME" title=" LPRng-HOWTO" href="index.htm">
    <link rel="UP" title="Installation" href="installation.htm">
    <link rel="PREVIOUS" title=
    "Updating Print Spooler Software and Startup Scripts" href=
    "update.htm">
    <link rel="NEXT" title="SAMBA and LPRng" href="smb.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-HOWTO: 1 Apr 2002
          (For LPRng-3.8.10)</th>
        </tr>

        <tr>
          <td width="10%" align="left" valign="bottom"><a href=
          "update.htm" accesskey="P">Prev</a></td>

          <td width="80%" align="center" valign="bottom">Chapter 2.
          Installation</td>

          <td width="10%" align="right" valign="bottom"><a href=
          "smb.htm" accesskey="N">Next</a></td>
        </tr>
      </table>
      <hr align="LEFT" width="100%">
    </div>

    <div class="SECT1">
      <h1 class="SECT1"><a name="LPSIMULATION">2.11. Emulation for
      UNIX SystemV <b class="APPLICATION">lp</b> and <b class=
      "APPLICATION">lpstat</b></a></h1>

      <p>Many utilities in the UNIX System V environment require
      the <b class="APPLICATION">lp</b>, <b class=
      "APPLICATION">lpstat</b>, and <b class=
      "APPLICATION">cancel</b> programs. It is almost impossible to
      modify these utilities, as many are <i class=
      "EMPHASIS">vintage</i> software which is unsupported or which
      would be too costly to update. In order to support these
      applications <b class="APPLICATION">LPRng</b> emulates the <b
      class="APPLICATION">lp</b>, <b class=
      "APPLICATION">lpstat</b>, and <b class=
      "APPLICATION">clean</b> programs. See the <b class=
      "APPLICATION">LPRng</b> man pages for <b class=
      "APPLICATION">lp</b>, <b class="APPLICATION">lpstat</b>, and
      <b class="APPLICATION">cancel</b> in the <b class=
      "APPLICATION">LPRng</b> distribution for details and
      compatibility.</p>

      <p>The <b class="APPLICATION">LPRng</b> <b class=
      "APPLICATION">lpstat</b> emulator accepts the <b class=
      "APPLICATION">lpstat</b> command line options returns status
      in a format that is close to the one that common <b class=
      "APPLICATION">lpstat</b> implementations return.
      Unfortunately, due to the wide variety of different
      modifications and vendor versions of <b class=
      "APPLICATION">lpstat</b> there are slight differences between
      the this status and the status returned by the original <b
      class="APPLICATION">lpstat</b>. If this is the case, then
      there is little to do but to modify the source code for <b
      class="APPLICATION">lpstat</b> and compile a version that
      implements the required format.</p>

      <p>If the <b class="APPLICATION">lpr</b> program is invoked
      with the name <b class="APPLICATION">lp</b>, it will simulate
      the <b class="APPLICATION">lp</b> options. This can be done
      by making a symbolic link to the <b class=
      "APPLICATION">lpr</b> program or by making a copy of the <b
      class="APPLICATION">lpr</b> program with the name <b class=
      "APPLICATION">lp</b>.</p>

      <div class="INFORMALEXAMPLE">
        <a name="AEN1297"></a>
<pre class="SCREEN">
    <tt class="PROMPT">h4: {59} #</tt> <tt class=
"USERINPUT"><b>cd /usr/bin</b></tt>
    <tt class="PROMPT">h4: {60} #</tt> <tt class=
"USERINPUT"><b>ln -s lpr lp</b></tt>
    <tt class="PROMPT">h4: {61} #</tt> <tt class=
"USERINPUT"><b>lp /tmp/hi</b></tt>
    request id is root@h4+489
</pre>
      </div>
      <br>
      <br>

      <p>Finally, if the <b class="APPLICATION">lprm</b> program is
      invoked with the name <b class="APPLICATION">cancel</b> it
      will simulate the <b class="APPLICATION">cancel</b> command.
      This can be done by making a symbolic link to the <b class=
      "APPLICATION">lprm</b> program or by making a copy of the <b
      class="APPLICATION">lprm</b> program with the name <b class=
      "APPLICATION">cancel</b>.</p>

      <div class="INFORMALEXAMPLE">
        <a name="AEN1312"></a>
<pre class="SCREEN">
    <tt class="PROMPT">h4: {62} #</tt> <tt class=
"USERINPUT"><b>cd /usr/bin</b></tt>
    <tt class="PROMPT">h4: {63} #</tt> <tt class=
"USERINPUT"><b>ln -s lprm cancel</b></tt>
    <tt class="PROMPT">h4: {64} #</tt> <tt class=
"USERINPUT"><b>cancel 489</b></tt>
    cancel 513
    Printer lp@h9:
      checking perms 'root@h9+513'
      dequeued 'root@h9+513'
</pre>
      </div>
      <br>
      <br>

      <p>Many <i class="EMPHASIS">vintage</i> or <i class=
      "EMPHASIS">legacy</i> applications have fully qualified paths
      to the <b class="APPLICATION">lp</b> and <b class=
      "APPLICATION">lpstat</b> executables, and it may be necessary
      to make additional symbolic links or copies of the <b class=
      "APPLICATION">LPRng</b> executables to satisfy their pathname
      requirements.</p>

      <div class="INFORMALEXAMPLE">
        <a name="AEN1326"></a>
<pre class="SCREEN">
    <tt class="PROMPT">h4: {65} #</tt> <tt class=
"USERINPUT"><b>ln -s /usr/bin/lpr /usr/ucb/lpr</b></tt>
</pre>
      </div>
      <br>
      <br>
    </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=
          "update.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=
          "smb.htm" accesskey="N">Next</a></td>
        </tr>

        <tr>
          <td width="33%" align="left" valign="top">Updating Print
          Spooler Software and Startup Scripts</td>

          <td width="34%" align="center" valign="top"><a href=
          "installation.htm" accesskey="U">Up</a></td>

          <td width="33%" align="right" valign="top">SAMBA and <b
          class="APPLICATION">LPRng</b></td>
        </tr>
      </table>
    </div>
  </body>
</html>