From nobody@FreeBSD.org  Thu Jul 29 09:27:52 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 48CE8106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 Jul 2010 09:27:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 385AC8FC25
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 Jul 2010 09:27:52 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o6T9RpFB000245
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 Jul 2010 09:27:51 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o6T9Rp89000244;
	Thu, 29 Jul 2010 09:27:51 GMT
	(envelope-from nobody)
Message-Id: <201007290927.o6T9Rp89000244@www.freebsd.org>
Date: Thu, 29 Jul 2010 09:27:51 GMT
From: Petr Lampa` <lampa@fit.vutbr.cz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: regression in /etc/rc.subr
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         149059
>Category:       conf
>Synopsis:       regression in /etc/rc.subr
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 29 09:30:07 UTC 2010
>Closed-Date:    Sat Mar 26 01:11:44 UTC 2011
>Last-Modified:  Sat Mar 26 01:11:44 UTC 2011
>Originator:     Petr Lampa`
>Release:        STABLE-8.1
>Organization:
BUT FIT
>Environment:
FreeBSD XXX  8.1-STABLE FreeBSD 8.1-STABLE #2: Wed Jul 28 15:00:35 CEST 2010     root@XXX:/usr/src/sys/i386/compile/XXX i386

>Description:
The last change in /etc/rc.subr broke sendmail startup with sendmail_enable="NONE". We start sendmail in our local script, after this change,  MTA daemon from /etc/rc.d/sendmail is started, too. We don't want two sendmail daemons in one system :-(  See
http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/rc.subr.diff?r1=1.88.2.10;r2=1.88.2.11;f=h

In our case $rc_pid contains pid of locally started sendmail, so this case in  run_rc_command is now false:

 if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ];
        if ! checkyesno ${rcvar}; then
                              if [ -n "${rc_quiet}" ]; then
                                        return 0
                                fi
        fi
 fi

The checkyesno is not executed and the script doesn't return through return 0 as it was returning before this change. I really don't understand why the test for rc_pid was added here and the CVS comment doesn't help too much:

SVN rev 207797 on 2010-05-08 21:18:22Z by dougb

MFC r206686:

Make 'stop' work even if ${name}_enable is not set.

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Jul 29 12:15:50 UTC 2010 
Responsible-Changed-Why:  
Over to committer of the change in question, for evaluation. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149059 
State-Changed-From-To: open->feedback 
State-Changed-By: dougb 
State-Changed-When: Fri Jan 7 22:50:47 UTC 2011 
State-Changed-Why:  

From what you described it sounds like what you really want is to set 
sendmail_*_enable=NO (look in /etc/defaults/rc.conf for the relevant 
knobs to set). 

If that works for you let me know and we can address the documentation 
issue separately. 


Doug 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149059 

From: Sean Bruno <seanbru@yahoo-inc.com>
To: bug-followup@FreeBSD.org, lampa@fit.vutbr.cz
Cc:  
Subject: Re: conf/149059: regression in /etc/rc.subr
Date: Fri, 07 Jan 2011 14:37:53 -0800

 Adding a "me too" to this issue in the sendmail startup scripts.
 
 It is affecting 7.3/.4 as well.
 
 Sean
 

From: Sean Bruno <seanbru@yahoo-inc.com>
To: bug-followup@FreeBSD.org, lampa@fit.vutbr.cz
Cc:  
Subject: Re: conf/149059: regression in /etc/rc.subr
Date: Fri, 07 Jan 2011 17:17:09 -0800

 rc.conf bits:
 sendmail_enable="YES"
 sendmail_submit_enable="NO"
 sendmail_outbound_enable="NO"
 sendmail_msp_queue_enable="NO"
 sendmail_flags="-q5m"
 
 This configuration was used to startup an outbound mail queue only.
 With SVN r 207811, FreeBSD 7 will obey this and actually start sendmail
 up *snd* an outbound queue handler.  
 
 Changing the rc.conf bits to the following restores my old behavior:
 sendmail_enable="NO"
 sendmail_submit_enable="NO"
 sendmail_outbound_enable="YES"
 sendmail_msp_queue_enable="NO"
 sendmail_flags="-q5m"
 
 
 IMO, old behavior is a bug and new behavior is more correct.
 
 However, the bugged, old-way rc.conf starts an MTA that can't be killed
 or stopped by /etc/rc.d/sendmail stop or onestop
 
 I've had to kill it manually to get it to go away.  I think this is a
 bug, and perhaps what the originator is referring to?
 
 Sean
 
State-Changed-From-To: feedback->closed 
State-Changed-By: dougb 
State-Changed-When: Sat Mar 26 01:09:17 UTC 2011 
State-Changed-Why:  

Feedback timeout, the issue can be dealt with in local configuration 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149059 
>Unformatted:
