"print command" minor issue
David Collier-Brown
David.Collier-Brown at Sun.COM
Fri Oct 14 19:05:03 GMT 2005
Gerald (Jerry) Carter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> David Collier-Brown wrote:
> | Do we log the fact that this happened? I suspect it should
> | be at a petty high log level, as it amounts to a
> | "Sorry Dave, but I can't do that" (;-))
>
> No. It's just like overriding any parameter.
> Patches to docs welcome :-)
Hmmn, there is a large special case to overriding things:
sets of parameters which are designed to be used in a
specific order. They (each) deserve different handling.
Consider printing = xxx, which sets at the least print command,
lpq command , and lprm command. It is intended to be used
first, then the others. It is reasonable to wrap it
with code to warn that it has changed a non-default
setting, which indicates a risk that the commands
have been used in backwards order:
printing() {
...
if (lpq != default)
erk("printing", "lpq");
else if (print != default)
erk("printing, "print");
...
}
erk(culprit, victim) {
printf("%s has just overwritten a value set by %s, "
which may not be what was desired\n", culprit, victim);
}
--dave
--
David Collier-Brown, | Always do right. This will gratify
Sun Microsystems, Toronto | some people and astonish the rest
davecb at canada.sun.com | -- Mark Twain
(416) 263-5733 (x65733) |
More information about the samba-technical
mailing list