Date: Sat, 13 Feb 2010 01:36:08 GMT From: Markus Hitter <mah@jump-ing.de> To: freebsd-gnats-submit@FreeBSD.org Subject: conf/143851: Some rc.d scripts confuse NO with NONE Message-ID: <201002130136.o1D1a8xZ002372@www.freebsd.org> Resent-Message-ID: <201002130140.o1D1e4Hq092269@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002130136.o1D1a8xZ002372>