I'm trying to better my understanding of how lprng/printcap works.
I've got an /etc/printcap entry that looks like:

lp
        :lp=/dev/null
        :sd=/var/spool/lpd/hplj3-remote
        :sh
        :pw#80
        :pl#66
        :px#1440
        :mx#0
        :if=/usr/bin/test
        :af=/var/spool/lpd/hplj3-remote/acct
        :lf=/var/log/lp-errs

The contents of /usr/bin/test are:

#!/bin/bash
echo "Here it is"

and the file permissions on /usr/bin/test are:
-rwxr-xr-x 1 daemon lp 55 Nov 26 13:41 /usr/bin/test

I can manually run /usr/bin/test and get the "Here it is" message, but when I try to "print" something, with a command like "lp /etc/printcap", /usr/bin/test appears not to run. (I realize this has no relevance to actual printing, but like I say, I'm trying to figure out how things work.)

Can anyone tell me what I'm missing?

Thanks!

Kent

Reply via email to