Subject: bin/26711: /etc/rc.d/sendmail doesn't deal gracefully with MKSENDMAIL=no
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/19/2004 09:17:14
>Number:         26711
>Category:       bin
>Synopsis:       /etc/rc.d/sendmail doesn't deal gracefully with MKSENDMAIL=no
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 18 23:18:00 UTC 2004
>Originator:     Daniel Carosone
>Release:        NetBSD 2.0G
NetBSD-current built with MKSENDMAIL=no (no /usr/libexec/sendmail/* and other files)
On startup, /etc/rc.d/sendmail issues a warning to the console:

 stat: /usr/libexec/sendmail/sendmail: stat: No such file or directory

This would appear to come from the following line, in the
sendmail_precmd function:

     68         _owner=$(stat -qf"${_owner_fmt}" /usr/libexec/sendmail/sendmail)

I have mailer.conf pointing to postfix, (and no sendmail binary at the
above path) so the magic variable assessment stuff in
check_need_sendmail ought to be deciding NO.

I'm therefore a little confused why sendmail_precmd is running at all.

rm /usr/libexec/sendmail/sendmail
/etc/rc.d/sendmail start
Conditionalise this stat on -x of the binary? (or -e?)
Conditionalise installation of rc.d/sendmail script on MKSENDMAIL?
Solve some other logic error that's causing sendmail_precmd to run
when it shouldn't?