|-c||Copy the input to the output without any conversion whatsoever (used by lpd whenever the -l option is passed to the lpr program).|
|-nuser||The login name of the user who submitted the job. Available to subfilters as $LPUSER. If the user has an associated GECOS entry it will be available as $LPUSERNAME.|
|-hhost||The host on which the job was submitted. Available to subfilters as $LPHOST.|
|A numeric option passed by lpd; can be set by the user by the -i option to lpr. Although nominally used for the amount of indentation requested, magicfilter makes it available to subfilters for any useful purpose as $LPINDENT.|
|--debug||Write debugging output to stdout. Every --debug increases the quantity of debugging output.|
|Tell what version of magicfilter this is.|
|--help||Prints out a synopsis of the command-line switches supported.|
|Any other options, such as the -w, -l, -x, and -y options typically passed by lpd are ignored.|
To run magicfilter from lpd it should be entered as one of the filters in the /etc/printcap file. Typically, it will be the input filter (if). Since most version of lpd do not accept arguments entered as part of the filter name, typically the filter name entered into the /etc/printcap file will simply be the name of the configuration file, which is set executable and starts with the line:
Most UNIX kernels will then be able to treat the configuration file itself as if it was the actual program.
For systems which do not support the #!-hack, the filter set in the if entry should point to magicfilter directly, and the accounting file (af) entry should point to the configuration file. This, however, is a less general, and hence less desirable solution.
Magicfilter has been extensively modified for the 2.0 release, and has very little in common with the old 1.2 magicfilter. The config-file format has changed pretty drastically, and old config files will not work anymore.
Currently, there is no protection against the pipe or fpipe facilities going into an infinite loop.
H. Peter Anvin <email@example.com>, David Parsons <firstname.lastname@example.org>
|2002/09/05||MAGICFILTER (8)||Version 2.3.h|