Specifications
6-13
System V Printer Configuration
Exit Codes
The following table describes how the print service interprets exit codes:
Code
Description
0 The print job completed successfully.
1 to 127 The print service encountered a problem in printing the job (for
example, there were too many nonprintable characters or the job
exceeded the printer’s capabilities). This problem does not affect
future print jobs. The print service should notify the person who
submitted the print job – via write or mail – that an error occurred in
printing the job. If a printer fault occurred, it was cleared.
128 Reserved for internal use by the print service. Interface scripts must
not exit with this code.
129 The print service encountered a printer fault in printing the job. This
problem affects future print jobs. If the fault recovery for the printer
directs the print service to wait for the administrator to fix the problem,
the print service should disable the printer. If the fault recovery is to
continue printing, the print service should not disable the printer, but
try printing again in a few minutes.
> 129 Reserved for internal use by the print service. Interface scripts must
not exit with codes in this range.
Setting up Printer Interface Scripts
By default, the print service uses the standard interface script, /etc/lp/model/standard. Use
this interface script to handle most of your printing needs.
To change the interface script after you add the printer, you can specify an interface
program using the –i option with the lpadmin command.
The following example adds a new printer called laser on printer port /dev/tty01. It uses a
customized interface program, located in the directory /usr/doceng/laser_intface. It can
handle three file types: i10, i300, and impress, and it can be used only by the users
doceng and docpub. (The following command example is split into multiple lines for
readability.)
lpadmin –p laser –v /dev/tty01 \
–i /usr/doceng/laser_intface \
–I ”i10,i300,impress” \
–u ”allow:doceng,docpub”
Using the terminfo Database
The print service relies on the standard interface script and the terminfo database to
initialize each printer and set up a selected page size, character pitch, line pitch, and
character set. Thus, it is usually sufficient to have the correct entry in the terminfo database
(/usr/lib/terminfo/terminfo.lp) to add a new printer to the print service.
The terminfo database identifies each printer by a short name, identical to the kind of name
used to set the TERM shell variable. For example, the name in the terminfo database for the
AT&T model 455 printer is 455.
To specify the terminfo type for your printer, use the –T option of the lpadmin command. By
default, the terminfo database includes entries for many popular printers. Select the terminfo
type that corresponds to your printer.
If terminfo does not include an entry for your printer, you might still be able to use the printer
with the print service. However, you will not be able to use automatic selection of page size,