From owner-freebsd-bugs@FreeBSD.ORG Sat Feb 13 01:40:05 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 436B9106566C for ; Sat, 13 Feb 2010 01:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 07E568FC15 for ; Sat, 13 Feb 2010 01:40:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o1D1e4ST092270 for ; Sat, 13 Feb 2010 01:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o1D1e4Hq092269; Sat, 13 Feb 2010 01:40:04 GMT (envelope-from gnats) Resent-Date: Sat, 13 Feb 2010 01:40:04 GMT Resent-Message-Id: <201002130140.o1D1e4Hq092269@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Markus Hitter Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B2B7106566B for ; Sat, 13 Feb 2010 01:36:09 +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 2B4588FC08 for ; Sat, 13 Feb 2010 01:36:09 +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 o1D1a8Bm002373 for ; Sat, 13 Feb 2010 01:36:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o1D1a8xZ002372; Sat, 13 Feb 2010 01:36:08 GMT (envelope-from nobody) Message-Id: <201002130136.o1D1a8xZ002372@www.freebsd.org> Date: Sat, 13 Feb 2010 01:36:08 GMT From: Markus Hitter To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: conf/143851: Some rc.d scripts confuse NO with NONE X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2010 01:40:05 -0000 >Number: 143851 >Category: conf >Synopsis: Some rc.d scripts confuse NO with NONE >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 13 01:40:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Markus Hitter >Release: 7.1 RELEASE >Organization: >Environment: FreeBSD freebsdfortinybsd.jump-ing.de 7.1-STABLE FreeBSD 7.1-STABLE #0 r187907M: Fri Jan 30 15:56:08 GMT-2 2009 root@freebsdfortinybsd.jump-ing.de:/usr/obj/usr/src/sys/GENERIC i386 >Description: While /etc/defaults/rc.conf (line 510) and /etc/rc.conf uses YES and NO to switch sendmail on and off, two scripts in /etc/rc.d check against [Nn][Oo][Nn][Ee] instead. Obviously, this leads to unwanted behaviour. Please find a patch attached. P.S.: There's also a "checkyesno" shell function used in similar places which might be preferred. I don't know. >How-To-Repeat: Boot with sendmail disabled in /etc/rc.conf: some sendmail stuff gets initialized anyways. >Fix: Patch attached with submission follows: diff -ur rc.d/sendmail rc.d.patched/sendmail --- rc.d/sendmail 2009-01-30 18:50:44.000000000 +0200 +++ rc.d.patched/sendmail 2010-02-13 01:31:41.000000000 +0200 @@ -24,8 +24,7 @@ procname=${sendmail_procname:-/usr/sbin/${name}} case ${sendmail_enable} in -[Nn][Oo][Nn][Ee]) - sendmail_enable="NO" +[Nn][Oo]) sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" diff -ur rc.d/var rc.d.patched/var --- rc.d/var 2009-01-30 18:51:06.000000000 +0200 +++ rc.d.patched/var 2010-02-13 01:18:18.000000000 +0200 @@ -41,7 +41,7 @@ { /usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var > /dev/null case ${sendmail_enable} in - [Nn][Oo][Nn][Ee]) + [Nn][Oo]) ;; *) /usr/sbin/mtree -deU -f /etc/mtree/BSD.sendmail.dist -p / > /dev/null >Release-Note: >Audit-Trail: >Unformatted: