Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 2010 09:27:51 GMT
From:      Petr Lampa` <lampa@fit.vutbr.cz>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/149059: regression in /etc/rc.subr
Message-ID:  <201007290927.o6T9Rp89000244@www.freebsd.org>
Resent-Message-ID: <201007290930.o6T9U8MB024594@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         149059
>Category:       misc
>Synopsis:       regression in /etc/rc.subr
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 29 09:30:07 UTC 2010
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007290927.o6T9Rp89000244>