Linux Debian support - lpr-2005 input filters

This is Interesting: Free IT Magazines  
Home > Archive > Linux Debian support > May 2006 > lpr-2005 input filters





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author lpr-2005 input filters
gobo20@lycos.com

2006-05-13, 1:12 am

pulled lpr-2005.05.01 from debian website and compiled it. it does
print, but i can't make it correctly handle input filters. the groups
have many disscussions on not being able to use input filters on
remote printers, so i tried to work with that as well and still no
luck.

below are my printcap entries. all my printers are network attached
in one way or another.

# hp 5 on lantronix mps-1
laser:\
:lp=:rm=192.168.1.101:rp=laser_text:\
:sd=/var/spool/lpd/laser:sh:

smallsys:\
:lp=/dev/null:\
:sd=/var/spool/lpd/smallsys:\
:if=/etc/smport:\
:sh:

ssa:\
:lp=rm=192.168.1.101:\
:rp=laser_text:\
:sd=/var/spool/lpd/ssa:\
:if=/etc/ssaport:\
:sh:

the smport filter:
#!/bin/sh
printf "\033(s12H" && cat | /usr/bin/lpr -Plaser && exit 0
exit 2

the ssaport filter:
#!/bin/sh
printf "\033(s12H" && cat && exit 0
exit 2

i'm not certain that the no-if-on-rm rule applies to both lpr and
lprng, and i can not find any reference to it in the source code.
pr test.txt | lpr -Psmallsys (or ssa) and looking at the stream
with tcpdump, i never see the escape codes.

here is where i'm real confused. the ssaport filter is not new,
it's still running on some boxes with lpr-048. also, the smport
filter is partially working because the output is redirected to
the laser queue, sans printf string.

does anyone have any thoughts on what i'm missing?

thanks.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com