Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to use lp interface file for lpd printer. 1

Status
Not open for further replies.

motoslide

MIS
Oct 30, 2002
764
0
0
US
I know I've seen this here before, but could not find the thread.
I have a printer which only supports lpr/lpd printing, so I have it defined as such with an /etc/printcap entry.
The problem is that we need the same logging ability which is found on standard "lp" printers (/usr/spool/lp/logs/requests). My idea is to define a shadow printer (which is NOT using lpd) and modify it's interface file to pass the job onto the "real" printer.
I've tried the alternative of adding ":lf=log" to the /etc/printcap entry, but nothing gets written to that file.
Thanks for the help, and feel free to slam me for not finding this myself.

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
I'll create a printer on /dev/null using your interface model.
Then I'll modify the /var/spool/lp/admins/lp/interfaces/printer script like this:
...
# send the file(s) to the standard out $copies times
while [ "$copies" -gt 0 ]
do for file
do 0<$file (
eval $FILTER) #2>&1
done[!] | lp -d lpd_printer[/!]
copies=`expr $copies - 1`
done
...


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top