System Administration Guide, Volume 2

Converting Printer Configuration Information Task Map

The table below provides an overview of converting printer configuration information.

Table 4-2 Converting Printer Configuration Information Task Map

Task 

Description 

For Instructions, Go To 

Convert Existing Printer Configuration Information 

Convert Printer Configuration Information For Systems Running the SunOS 5.5.1 Release

If your site uses SunOS 5.5.1 release, convert the printer configuration information in the /etc/lp/printers directory to the /etc/printers.conf configuration file. This is usually a one-time task.

"How to Convert Printer Information For a System Running the SunOS 5.5.1 Release"

 

Convert Printer Configuration Information For a System Running the SunOS 4.1 Release

If your site uses SunOS 4.1 software, convert the printer configuration information in a 4.1 system's /etc/printcap file to the /etc/printers.conf configuration file. This is usually a one-time task.

"How to Convert Printer Information For a System Running the SunOS 4.1 Release"

Convert Printer Configuration Information in NIS+ (+xfn) to NIS+ Format 

Managing printer configuration information in the NIS+ name service without the underlying xfn application layer provides better performance. 

"How to Convert Printer Configuration Information in NIS+ (+xfn) to NIS+ Format"

Converting Existing Printer Configuration Information

Existing printer configuration information will automatically be converted when installing or upgrading to the Solaris 8 release. This section explains how to convert the printer configuration information for a system running SunOS 5.5.1 release or a system running the SunOS 4.1 release to the /etc/printers.conf printer configuration file. You'll use one of two print administration commands to automate the conversion task:

If you are not using a name service, you should create a master /etc/printers.conf file that includes the existing printers at your site. You can then copy the master file to all the print clients or by loading it into the NIS or NIS+ name service. This is a good way to initially enable all the new print clients access to the existing printers at your site.


Caution - Caution -

If you are using the NIS or NIS+ name service to configure printer information, do not use a /etc/printers.conf file on your print clients. A print client uses the /etc/printers.conf file first to locate a printer; however, the /etc/printers.conf file might conflict with the printer information in the NIS or NIS+ maps and cause unexpected results. To avoid this problem, remove the /etc/printers.conf file on print clients when you want them to use NIS or NIS+ for printer information.


How to Convert Printer Information For a System Running the SunOS 5.5.1 Release

  1. Log in as superuser on a system running the SunOS 5.8 release.

  2. Convert the printer configuration information in the system's /etc/lp/printers directory to the /etc/printers.conf file.


    # /usr/lib/print/conv_lp
    

How to Convert Printer Information For a System Running the SunOS 4.1 Release

  1. Copy the /etc/printcap file from a SunOS 4.1 system to a system running the SunOS 5.8 release.

  2. Log in as superuser on the system running the SunOS 5.8 release to which you copied the /etc/printcap file.

  3. Convert the printer configuration information in the /etc/printcap file to the /etc/printers.conf file.


    # /usr/lib/print/conv_lpd
    

How to Convert Printer Configuration Information in NIS+ (+xfn) to NIS+ Format

The following conversion script can only be run on a system running the Solaris 8 release.

  1. Log in as superuser on the NIS+ master.

  2. Copy the following conversion script to system and name it something like /tmp/convert.


    #!/bin/sh
    #
    #	Copyright (C) 1999 by Sun Microsystems, Inc.
    #	All Rights Reserved
    #
    PRINTER=""
    
    for LINE in `lpget -n xfn list | tr "\t " "^A^B"` ; do
    	LINE=`echo ${LINE} | tr "^A^B" "\t " | sed -e 's/^	 \t//g'`
    	case "${LINE}" in
    		*:)
    			PRINTER=`echo ${LINE} | sed -e 's/://g'`
    			;;
    		*=*)
    			lpset -n nisplus -a "${LINE}" ${PRINTER}
    			;;
    	esac
    done

    Note -

    If you cut and paste this script into a text file, change both ^A^B (caratA caratB) sequences to Control A Control B.


  3. Make the script executable.


    # chmod 755 /tmp/convert
    
  4. Run the conversion script.


    # /tmp/convert