%s and %f in the print command expand to the same thing.

Amador, Orlando M. [OBI] oamador at OBIPR.JNJ.com
Mon May 17 19:26:49 GMT 1999

I created a custom printer in the smb.conf with a parameter: 

        comment = Fax Server
        path = /var/spool/samba
        guest ok = Yes
        min print space = 2000
        print ok = Yes
        printing = lprng
        print command = /usr/local/bin/submitfaxspool_background -m %M -u %u
        lpq command = /usr/local/lib/mgetty+sendfax/faxlpq %p
        lprm command = /usr/local/lib/mgetty+sendfax/faxcancel %j
        lppause command = /usr/local/lib/mgetty+sendfax/faxpause %j
        lpresume command = /usr/local/lib/mgetty+sendfax/faxresume %j

The problem is that %s in the print command is not expanding to the full
path of the 
file.  I had to add the spool directory to the print command line.  %f
expands to the 
same as %s.  According to the documentation %s should be the full path,

Here is the part of the documentation that I'm reading:

The full path name will be used for the filename if "%s" is not preceded 
by a '/'. If you don't like this (it can stuff up some lpq output) then use 
"%f" instead. Any occurrences of "%f" get replaced by the spool filename 
without the full path at the front. 

When it says "if '%s' is not preceded by a '/'" does it means the character
before the "%" or does it means anywhere in the line?  I can explain why %s
is not expanding 
to the full path name.

Could anyone help me figure this out?


Orlando M. Amador
oamador at obipr.jnj.com <mailto:oamador at obipr.jnj.com> 
(787) 854-1800 x2294

More information about the samba mailing list