[lsb-discuss] Clarification of general LSB requirements

Aaron Sowry aeneby at gmail.com
Wed Jul 10 08:39:24 UTC 2013


On Wed, 2013-07-10 at 08:46 +0100, Andrew Josey wrote:
> So the required behaviour is as specified in the referenced specifications except where
> documented in 15.2

Thanks. This is also how I interpreted things.

On Wed, 2013-07-10 at 00:54 -0700, Russ Allbery wrote:
> In fact, I think the situation with lpr is very similar to the
> situation with sendmail. What is lpr expected to do if no printer is
> configured?

That's up to lpr - it could tell the calling application that no printer
has been configured, for example. Much like sendmail, lpr does not (and
cannot) guarantee that a job will be printed.

> Is a fake lpr that exits with a failure status acceptable on a system
> that will *never* have a printer configured?

No.

An error is something like "unable to resolve MX record for the domain",
or "no printer configured". Saying "this command isn't actually what
it's pretending to be" is not an error - it's a foolish hack at best; at
worst a trojan. Regardless of how well error handling has been
implemented, no application can reasonably interpret and handle an error
message such as that.

If a system will absolutely, positively *never* have to send an email,
and you feel that having a redundant sendmail command is burning a hole
in your hard disk, then you can get rid of the sendmail completely. At
this point it is obvious to an application why mail cannot be sent, and
the situation can be handled appropriately.

Of course, this would mean that the system is no longer LSB compliant,
but that's beside the point. If this ancient practice of Linux systems
processing email is really as horrible as some people are making it out
to be, then simply remove sendmail from the LSB specification. However,
just paying lip service to the spec by implementing "fake" commands like
this is bad practice, and IMHO a violation of the LSB.



More information about the lsb-discuss mailing list