conf/143851: Some rc.d scripts confuse NO with NONE

Markus Hitter mah at
Sat Feb 13 01:40:05 UTC 2010

>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
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 13 01:40:04 UTC 2010
>Originator:     Markus Hitter
>Release:        7.1 RELEASE
FreeBSD 7.1-STABLE FreeBSD 7.1-STABLE #0 r187907M: Fri Jan 30 15:56:08 GMT-2 2009     root at  i386

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.
Boot with sendmail disabled in /etc/rc.conf: some sendmail stuff gets initialized anyways.

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 @@
 case ${sendmail_enable} in
-	sendmail_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


More information about the freebsd-bugs mailing list