The smb.conf(5) manpage descripbes the printing (S) parameter as below: printing (S) This parameters controls how printer status information is interpreted on your system. It also affects the default values for the print command, lpq command, lppause command , lpresume command, and lprm command if specified in the [global] section. ... but this differs from actual behavior: $ echo 'printing = bsd' > smb.conf $ testparm -s -v smb.conf > bsd.out $ echo 'printing = sysv' > smb.conf $ testparm -s -v smb.conf |diff bsd.out - 241c241 < printing = bsd --- > printing = sysv
Created attachment 421 [details] load the config file and then initialize the printing options
Fixed in 3.0 and HEAD
This patch breaks other things: $ cat smb.conf [printer] print ok = YES $ testparm -V Version CVS 3.0.3pre1 $ testparm -s smb.conf Load smb config files from smb.conf Processing section "[printer]" No path in service printer - using /tmp Loaded services file OK. # Global parameters [global] print command = lpr -r -P'%p' %s lpq command = lpq -P'%p' lprm command = lprm -P'%p' %j [printer] path = /home/fumiya/var/tmp printable = Yes print command = lpq command = lprm command = With Samba 3.0.2a: $ testparm -V Version 3.0.2a $ testparm -s smb.conf Load smb config files from smb.conf Processing section "[printer]" No path in service printer - using /tmp Loaded services file OK. # Global parameters [global] [printer] path = /home/fumiya/var/tmp printable = Yes
Different bug actually. DEFAULT_PRINTING was always getting set to PRINT_BSD on linux systems rather than looking for cups support.
Created attachment 424 [details] don't default to bsd printing on linux
fixed checked into 3.0 and HEAD $ cat /tmp/smb.conf [printers] print ok = yes $ bin/testparm -s /tmp/smb.conf Load smb config files from /tmp/smb.conf Processing section "[printers]" No path in service printers - using /tmp Loaded services file OK. # Global parameters [global] [printers] path = /tmp printable = Yes browseable = No
Reopened. $ cat smb.conf [global] printing = sysv [printer] print ok = YES $ testparm -s smb.conf Load smb config files from smb.conf Processing section "[printer]" No path in service printer - using /tmp Loaded services file OK. # Global parameters [global] printing = sysv print command = lp -c -d%p %s; rm %s lpq command = lpstat -o%p lprm command = cancel %p-%j lppause command = lp -i %p-%j -H hold lpresume command = lp -i %p-%j -H resume queuepause command = disable %p queueresume command = enable %p [printer] path = /tmp printable = Yes print command = lpq command = lprm command = lppause command = lpresume command = queuepause command = queueresume command =
The patch "don't default to bsd printing on linux" in Additional Comment #5 is for source/script/installswat.sh, not for printing system. :-)
The problem is that the various print commands are initialized based on the value of DEFAULT_PRINTING from include/includes.h which is done before any smb.conf parsing. grrr....this bug has been a snakepit.
You know what? I'm just oging to fix the docs. This is a chicken-and-egg problem that I can't figure out how to work around. I cannot see a way to inject new defaults based on parsing 'printing = ...' in the global section (in the middle of parsing). Right now the best solution is to explicitly set the 'print command', et. al. manually in the global section. At least now you can override the struct printif* on a per section basis so cups doesn't take complete control.
have a fix now.
ok. I think this should fix things now. as well as resolving the things I broke in 3.0.3pre[12]. Changes checked into 3.0 and trunk.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.