[Samba] start of print file spool to samba
Floyd Shackelford
floyds at 4peakstech.com
Thu Apr 25 05:46:02 GMT 2002
oooooh. that's what you meant.
i was thinking that a jni/rmi call would be much, much faster. but this is
easiest to "code".
i'll do it.
thanks for helping me see the forest. i was concentrating on the trees.
Regards,
Floyd Shackelford
4 Peaks Technology Group, Inc. <http://www.4peakstech.com/>
VOICE: 334.735.9428
FAX: 916.404.7125
EMAIL: FloydS at 4PeaksTech.com <mailto:FloydS at 4PeaksTech.com>
acta non verba
-----Original Message-----
From: Gerald Carter [mailto:jerry at samba.org]
Sent: Wednesday, April 24, 2002 8:02 PM
To: Floyd Shackelford
Cc: samba at lists.samba.org
Subject: RE: [Samba] start of print file spool to samba
On Wed, 24 Apr 2002, Floyd Shackelford wrote:
> i found the following two files with the string "print command":
>
> ./param/loadparm.c: {"print command", P_STRING, P_LOCAL,
> &sDefault.szPrintcommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL},
loadparm.c is for declaring parameters and parsing smb.conf.
> ./printing/print_generic.c: run a given print command
>
> as best as i can tell, it's NOT loadparm.c. so that leaves
> print_generic.c
That's what I was thinking of.
> if (strcmp(syscmd,"print command") == 0)
> {
> // do my thing
> }
> ret = smbrun(syscmd,outfd);
>
> DEBUG(3,("Running the command `%s' gave %d\n",syscmd,ret));
Why not just make your command a wrapper that executes the lpr command?
Something like
#!/bin/sh
my_command $1
lpr -P$2 $3
/bin/rm -f $3
and add a "print command = some_script.sh %I %p %s"
No code changes necessary.
cheers, jerry
---------------------------------------------------------------------
Hewlett-Packard http://www.hp.com
SAMBA Team http://www.samba.org
-- http://www.plainjoe.org
"Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2
--"I never saved anything for the swim back." Ethan Hawk in Gattaca--
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
More information about the samba
mailing list