[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Possible bug in multiple packages

Package: sendmail
Version: 8.9.3-3

> No, I mean that the /etc/init.d/sendmail script is currently doing a
> test to see
> if /usr/doc/sendmail is set executable.  THAT is what I have seen as
> a "bug".

Actually, -d tests for its existence as a directory.

You're right that there's a bug, but you're wrong about the nature of
the bug.  Let me explain.

/etc/init.d/sendmail is a conffile of the sendmail package.  This
means that when the sendmail package is removed but not purged, the
/etc/init.d/sendmail script remains, and will be executed each and
every time the system is booted.  But we do not want it to run if the
sendmail package has been removed!  So the program must test whether
or not the sendmail package is still installed.

Now the obvious way to do this would be to test for the existence of
/usr/sbin/sendmail.  Unfortunately, packages such as exim and smail
symlink /usr/sbin/sendmail to /usr/sbin/exim and /usr/sbin/smail
respectively, so this doesn't work.

The current method is to check for the documentation directory,
/usr/doc/sendmail, which is guaranteed to work -- usually.  However,
it turns out that some people have /usr/doc NFS-mounted (and this may
become even more prevalent with the move to /usr/share/doc), and if
the documentation area (/usr/share) is temporarily unavailable or not
yet mounted, or if the documentation tree (/usr/doc) has been removed
or the like, then the script will erroneously assume that sendmail is
not installed.

The simplest solution currently available would be to change the test
in /etc/init.d/sendmail to:

test -x $DAEMON -a -d /usr/sbin/sendmailconfig || exit 0

as the sendmailconfig program only exists in the sendmail package.



  Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
        Debian GNU/Linux Developer,  see http://www.debian.org/~jdg

Reply to: