LPRng Reference Manual: 3 May 2004 (For LPRng-3.8.27)
Prev | Chapter 12. Printcap Database | Next

# 12.6. Enterprise Strength Printcap Example

Most system administrators want to have a single printcap file that can be distributed or referenced from all the hosts under their administrative control. The following show how several large institutions have organized their printcap information. It uses the following principles:

- Many times it is necessary to partition groups of users into areas that have particular printing setups, but use the same queue name for different printers. This is done by using the :oh (on this host) option to select the printcap to be used.

- Provide as little information as possible to the systems that do not have print spoolers. This is because they will simply forward their requests to a print spooler and it is not necessary to have the information for a printer. As we will see in an example below, this can be very simple to do.

- Provide a default printer so that when the user does not have a printer explicitly selected then he will get well behaved results.

- For each family of printers, develop a standard method of interfacing to them. This means that the filter, options, and other things should be identical.

- For each server, provide a uniform set of standards for the spool queues for a printer. If the spool queue is simply used to store and forward jobs, then provide a standard default operation for this queue. If the spool queue directly feeds a printer, use the default options for the printer, and then refine them with printer specific information.

        # client setups; note brutality of this method that
        #  assigns servers to clients based on their names
        #  you could do this for IP addresses as well
        # lp1 is default printer for Engineering
        #   Default client information
        .client=force_localhost@
        #
        lp1:oh=*.eng.com:lp=%P@server1.eng.com:tc=.client
        *:oh=*.eng.com:lp=%P@server1.eng.com:tc=.client
        color:oh-*.admin.com:lp=%P@server2.admin.com:tc=.client
        *:oh=*.admin.com:lp=%P@server2.admin.com:tc=.client
        lowres:lp=%P@general.services.com:tc=.client
        *:lp=%P@general.services.com:tc=.client

        # Standard Printer Configurations
        # this is for the HP4simx, we use a standard filter setup
        .cf_hp4simx
         :ifhp=model=hp4simx
         :filter=/usr/local/libexec/filters/ifhp
        .cf_hplj5000
         :ifhp=model=hp5000
         :filter=/usr/local/libexec/filters/ifhp
        # now we define the printers that use them
        .pr_eng1:cm=Engineering's Printer 1
         :tc=.cf_hplj5000:lp=10.0.0.2%9100
        .pr_eng2:cm=Engineering's Printer 2
         :tc=.cf_hplj5000:lp=10.0.0.23%9100

        # now we define the server entries
        # We set up server entries and then forward
        #  to a single server that sends the the printer

        .server
         :sd=/var/spool/lpd/%P
         :mx=0
        pr1:oh=!10.0.0.5:lp=%P@10.0.0.5:server:tc=.server
        pr1:oh=10.0.0.5:tc=.server
         :tc=.pr_eng1

Prev | Home | Next
Using the Wildcard Printcap Entry | Up | Remote Printer Using RFC1179