Single Printcap File for Large Installation

LPRng Reference Manual: 24 Sep 2004 (For LPRng-3.8.28)
Prev | Chapter 12. Printcap Database | Next

# 12.16. Single Printcap File for Large Installation

One of the major problems faced by administrators of large sites is how to distribute printcap information. They would like to have a single printcap file either distributed by a file server (NFS) or by some other method such as rdist. By using the server and oh tags, information for the specific sites can be separated out. For example:

        # printcap
        pr1:lp=pr1@serverhost1:oh=*.eng.site.com,130.191.12.0/24
        pr2:lp=pr1@serverhost1:oh=*.eng.site.com,130.191.12.0/24
        pr1:lp=pr2@serverhost2:oh=*.admin.site.com
        pr2:lp=pr2@serverhost2:oh=*.admin.site.com
        pr1:server:oh=serverhost1.eng.com:lp=/dev/lp:tc=.common
        pr2:server:oh=serverhost2.admin.com:lp=/dev/lp:tc=.common
        .common:sd=/usr/local/lpd/%P

The above example has some interesting effects. The pattern is used as a glob pattern and is applied to the fully qualified domain name (FQDN) of the host reading the printcap file. For example, `*.eng.site.com` would match host `h1.eng.site.com` but would not match `h1.admin.site.com`. Thus, the effects of the first couple of entries would be to specify that the pr1 and pr2 printers on the eng hosts would be pr1@serverhost1, and on the admin hosts would be pr2@serverhost2,

Also, the lpd daemons on serverhost1 and serverhost2 would extract the additional information for pr1 and pr2 respectively, overriding the common lp entries.

Prev | Home | Next
Locations of Printcap Files | Up | Management Strategies for Large Installations