On Sat, Feb 02, 2002 at 11:34:59AM -0800, Patrick Powell wrote:
> Use the 'lpq -llll ' or even 'lpq -L' to get more details about the failure.
> 
> > Subject: LPRng: JABORT with smbclient command in a print filter
> >
> > I am trying to print to a samba shared printer with linux.
> >
> > The printer "test" works fine locally  with lpr -Ptest filetoprint and works fine 
>with the
> > command below ON THE COMMAND LINE:
> >
> > cat filter | enscript -Z -p -  | smbclient //hammer2/test -N "-c print - "
> >
> > However, the command:
> >
> > enscript -Z -p -  | smbclient //hammer2/test -N "-c print - "
> >
> > fails with a JABORT message in the status file when run from a filter
> > in a different queue.
> >
> > Removing the smbclient command allows the filter to function normally.
> >
> > Any insight appreciated.

Well, there were at least two bugs, or three, in my script. Next time
I'll just post the entire script.

First, I found the cause of JABORT. There was an uncommented fragment
of a line farther down the script, (I have vi set for automatic line
wrapping.) after my smbclient command. That was causing the JABORT.

Secondly, smbclient wasn't printing anything out. This was due
the lack of a complete path for the smbclient command. This command works:

enscript -Z -p - | /usr/local/samba/bin/smbclient //hammer2/text -N -c "print -" 
1>junk 2>junk  

If I had but the redirection commands in there at the start (2>junk, etc) I
would have discovered this mistake early on.

Thirdly, I was also using cat | enscript etc in my script. This doesn't seem
to work. enscript alone is all you need.

Thanks for the help. It was the smbprint script in LPRngTools that gave
me the idea of trying to redirect the output of smbclient, and it was
smbprint that made me realize I needed the full path of smbclient.

BTW, is there a misprint in smbprint in LPRngTools? This is the print
command in that script:

$smbclient "$share" -E ${hostip:+-I} $hostip -N ${workgroup:+-W}
"$workgroup" \
 ${authfile:+-A} "$authfile" "-c $command" >&2                              
                             ^?
Shouldn't that last command be:
-c "$command" >&2

Thanks,
Joel

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to