Chapter 15. Job Processing

Table of Contents
15.1. Configuration and Setup Options
15.2. Submitting Jobs and Service Requests
15.3. Job Reception
15.4. Spool Queue Processing
15.5. Opening the Output Device
15.6. Printing Banners
15.7. Printing Job Files
15.8. Printing Banner At End of Job
15.9. Normal Termination
15.10. Abnormal Termination
15.11. Forwarding Jobs
15.12. Debugging

Much of the flexibility of the LPRng software is obtained from the ability to control the details of each step of job processing. The following section details each step in the processing of a job, and explains the printcap options used to control each operation.

Assume the pr printcap entry has the form:

    pr
        :lp=/dev/lp  OR  :lp=rp@rm
        :sd=/var/spool/lpd/pr
        :lf=log
        :filter=/usr/local/bin/lpf


Assume that we have used the following command to print a set of files.

    lpr -Ppr file1 file2


This will create a control file in the /var/spool/lpd/pr directory with the following contents (this is an example - in practice there may be minor differences between the example and an actual control file):

    Hh4.private
    J/tmp/file1 /tmp/file2
    CA
    Lpapowell
    Ppapowell
    fdfA002230h4.private
    N/tmp/file1
    UdfA002230h4.private
    fdfB002230h4.private
    N/tmp/file2
    UdfB002230h4.private


We will refer to this example throughout the following sections.

15.1. Configuration and Setup Options

Options used:



The ipv6 specifies that the IPV6 protocol, rather than IPV4 will be used.

The lockfile specifies the location of the lock file used by the lpd server. This file has the port number in the lpd_port value appended to form a unique lock file name.

The spool_dir_perms and spool_file_perms (default 0700 and 0600 respectively) values are the (numeric) permissions for the spool directory and spool files.

The report_server_as option allows an administrator to masquerade a server with another name. This could be useful if various load sharing activities are being carried out, or if there are problems reconfiguring DNS to cause the correct server name to be reported.

The default_tmp_dir option specifies a temporary directory to be used to hold files or information temporarily if there is no spool directory available.