Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
npu Interface Scripts (UNIX-Connect Administration) (m6031ab+scripts.htm)
npu Interface Scripts
Two standard npu interface scripts are supplied
with the npu product: one interfaces to npu from the
UNIX lp subsystem; the other from Reality. These standard interface scripts act
as templates from which printer-specific scripts can be created by the
Network Printer Administration utility.
UNIX lp
UNIX lp relies on the printer interface script to
gather banner data and to print the requested number of print file copies.
The lp interface script performs the following
functions:
- Gathers details of the printer name,
user-id, job id, number of copies, the banner title and the names of the files
to be printed.
- Assigns appropriate configuration options to
variables for substitution on the npu command line.
- Produces a banner title from the banner data
supplied as part of the configuration.
- For each file to be printed, produces the
number of copies required and supplies the appropriate number of form-feeds to
each copy.
- Pipes the data from step 3 and step 4 to npu. The variables assigned in
step 2 form the command line options.
- For files that are inaccessible from the script
(for example, no read permission), an error is written to the error log ?
/usr/adm/RCS/NPU_ERROR_LOG.
- The npu exit code is returned to the lp
subsystem. If a problem occurs during communication with the printer, npu
will disable the printer within the lp sub-system.
Reality
The Reality interface script is called directly from the
Reality spooler sub-system. This script is simpler in operation than the
lp
version, as the Reality spooler is responsible for supplying banner data and
will supply the appropriate number of end-of-job form-feed characters for each
individual print job.
The Reality interface
script performs the following functions:
- Gathers details of the printer name,
user-id, job id, number of copies, the banner title and the name of the file to
print. The number of copies will always be 1 and the banner title string will be
null.
- Assigns appropriate configuration parameters to
variables for substitution on the npu command line.
- Calls npu with the file name supplied
using the -f npu command line option. The variables supplied in
step 2 above form the command line options to npu. The print file
would normally be a named pipe. For printers specified in Reality to be
permanent, this pipe will be kept permanently open.
- For files that are inaccessible from the script
(for example, no read permission), an error is written to the error log ?
/usr/adm/RCS/NPU_ERROR_LOG.
- The npu exit code is returned to the
Reality spooler sub-system.