All rights reserved.
Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the University of California, Berkeley. The name of the
University may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@(#)lpd.8 6.4 (Berkeley) 09/29/88
Access control is provided by two means. First, All requests must come from one of the machines listed in the file /etc/hosts.equiv or /etc/hosts.lpd . Second, if the ``rs'' capability is specified in the printcap entry for the printer being accessed, lpr requests will only be honored for those users with accounts on the machine with the printer.
The file minfree in each spool directory contains the number of disk blocks to leave free so that the line printer queue won't completely fill the disk. The minfree file can be edited with your favorite text editor.
The file lock in each spool directory is used to prevent multiple daemons from becoming active simultaneously, and to store information about the daemon process for lpr (1), lpq (1), and lprm (1). After the daemon has successfully set the lock, it scans the directory for files beginning with cf . Lines in each cf file specify files to be printed or non-printing actions to be performed. Each such line begins with a key character to specify what to do with the remainder of the line.
If a file can not be opened, a message will be logged via syslog (3) using the LOG_LPR facility. Lpd will try up to 20 times to reopen a file it expects to be there, after which it will skip the file to be printed.
Lpd uses flock (2) to provide exclusive access to the lock file and to prevent multiple deamons from becoming active simultaneously. If the daemon should be killed or die unexpectedly, the lock file need not be removed. The lock file is kept in a readable ASCII form and contains two lines. The first is the process id of the daemon and the second is the control file name of the current job being printed. The second line is updated to reflect the current status of lpd for the programs lpq (1) and lprm (1).
/etc/printcap printer description file /usr/spool/* spool directories /usr/spool/*/minfree minimum free space to leave /dev/lp* line printer devices /dev/printer socket for local requests /etc/hosts.equiv lists machine names allowed printer access /etc/hosts.lpd lists machine names allowed printer access, but not under same administrative control.
.ul 4.2BSD Line Printer Spooler Manual