[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

LPD execv error



I have an issue I am trying to solve with the BSD lpr package
on a potato system. I have installed the following:

  - lpr
  - magicfilter
  - ghostscript
  - netpbm

I have created a printcap using magicfilterconfig which appears
to work fine. When I do something like:

  lpr tiger.ps

I can hear the disk churning, and I can see that magicfilter and
gs are running to convert the postscript file to PCL for the
HP DeskJet 550C using the correct filter. So far so good.

The issue comes because what I am actually trying to do is create
a bootable CD that will contain a complete lpr/samba print server
and which will allow the target system to boot and run directly
from the CD. I have succesfully configured all the things I need
to have running on this system except for the lpd process. To copy
lpd to the target system, I had to do the following:

  - apt-get source lpr
  - change the hardcoded path in pathnames.h for the printer
    socket to /var/run/lpd.socket
  - make and copy the resulting binaries over to the staging
    area for my root isofs

I had to make this modification to the lpr source because the root
filesystem will (obivously) be read only and therefore lpd will
not be able to create its /dev/printer socket. I do, however, have
a mounted partition on /var/ for spooling, etc., so lpd can create
its socket in /var/run. I have also provided a symlink in the root
filesystem image from /dev/printer to /var/run/lpd.socket to that
anything that expects to use /dev/printer will still work. 

In fact, the system boots fine and all the processes, including lpd
start up ok. I can see using lsof that lpd is using the correct
socket, etc. Everything like lpr, lpq, etc. seem to work as they 
should *except*:

Anytime I spool any sort of job (for example 'lpr tiger.ps'), I see
a single message in the syslog similar to:

lpd[77]: cannot execv /etc/magicfilter/dj550c-filter

However, all the other programs I have on this system work fine, and
if I execute:

/etc/magicfilter/dj550c-filter < /tmp/tiger.ps > /tmp/tiger.out

Then gs obediently converts my PostScript file to PCL just fine. I
deduce from this that there is nothing really wrong with the filter
script, or magicfilter, or gs themselves, but instead with lpd. I
can't determine from the syslog message exactly *why* lpd thinks it
can't execv my filter, so I am sort of at a loss as to what to look
at next. Before I go and modify the lpr source to give me more info,
I thought I'd try the list to see if anyone has any insight to offer.
I searched DejaNews fairly extensively, and I saw a ton of questions
regarding this same sort of execv error message with lpd, but I
didn't see a single answer beyond 'there must be something wrong
with your filter'.

I have also tried to eliminate issues like permissions by doing
things like 'chmod -R 777 /var/spool/', etc., to no avail. I
also tried using lprng, but I got even worse results. Lprng would
start up on my CD based system, but it wouldn't do anything;
no log output, no errors, no spooling, no filtering, nothing. It
just sat there happily repeating that there were no queue entries.




__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


Reply to: