From owner-freebsd-bugs@FreeBSD.ORG Fri Feb 15 22:10:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 50BE42E5 for ; Fri, 15 Feb 2013 22:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 3264491E for ; Fri, 15 Feb 2013 22:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1FMA1af003128 for ; Fri, 15 Feb 2013 22:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1FMA17w003124; Fri, 15 Feb 2013 22:10:01 GMT (envelope-from gnats) Resent-Date: Fri, 15 Feb 2013 22:10:01 GMT Resent-Message-Id: <201302152210.r1FMA17w003124@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, Jeremy Chadwick Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4F9189A for ; Fri, 15 Feb 2013 22:02:08 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta06.emeryville.ca.mail.comcast.net (qmta06.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:43:76:96:30:56]) by mx1.freebsd.org (Postfix) with ESMTP id 351278D9 for ; Fri, 15 Feb 2013 22:02:08 +0000 (UTC) Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta06.emeryville.ca.mail.comcast.net with comcast id 0lLp1l0011zF43QA6m28kt; Fri, 15 Feb 2013 22:02:08 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta24.emeryville.ca.mail.comcast.net with comcast id 0m271l00A1t3BNj8km27ce; Fri, 15 Feb 2013 22:02:07 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 1AC5C73A1C; Fri, 15 Feb 2013 14:02:07 -0800 (PST) Message-Id: <20130215220207.1AC5C73A1C@icarus.home.lan> Date: Fri, 15 Feb 2013 14:02:07 -0800 (PST) From: Jeremy Chadwick To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: bin/176181: rc.subr emitting warnings for non-defined xxx_enable vars, and errors/warnings not going to terminal X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jeremy Chadwick List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 22:10:01 -0000 >Number: 176181 >Category: bin >Synopsis: rc.subr emitting warnings for non-defined xxx_enable vars, and errors/warnings not going to terminal >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 15 22:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Jeremy Chadwick >Release: FreeBSD 9.1-STABLE amd64 >Organization: >Environment: System: FreeBSD icarus.home.lan 9.1-STABLE FreeBSD 9.1-STABLE #0 r246644: Sun Feb 10 16:55:49 PST 2013 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_9_amd64 amd64 >Description: The following discussion has taken place on freebsd-stable: http://lists.freebsd.org/pipermail/freebsd-stable/2013-February/072303.html http://lists.freebsd.org/pipermail/freebsd-stable/2013-February/072304.html http://lists.freebsd.org/pipermail/freebsd-stable/2013-February/072317.html http://lists.freebsd.org/pipermail/freebsd-stable/2013-February/072318.html http://lists.freebsd.org/pipermail/freebsd-stable/2013-February/072319.html http://lists.freebsd.org/pipermail/freebsd-stable/2013-February/072320.html There are two issues as I see them: 1. Lack of a defined xxx_enable variable in rc.conf(5) (regardless of the value) results in warn() being called. Ex: WARNING: $svnserve_enable is not set properly - see rc.conf(5). A lack of definition of xxx_enable variable should be treated as the same as xxx_enable="no" (i.e. the service is disabled) and should not emit a warning. 2. When using service(8), the warn() calls are not making it to the user's terminal -- they only end up in /var/log/messages. Looking at rc.subr(8), it appears the echo statements in err() and warn() are not making it to the user's terminal. I tried using "logger -s" and it made no difference -- it's as if some part of the rc.subr infrastructure is redirecting stdout and stderr to /dev/null way before the echo statements. >How-To-Repeat: * Install a port that uses rc.d in some way * Make sure there is no xxx_enable variable set for it in /etc/rc.conf * Run "service -e" * Check /var/log/messages >Fix: The patch provided by Alfred Bartsch does address issue #1, however I feel that (effectively) changing checkyesno() to remove the warn() is not the right solution. I believe it would be wiser to handle the situation through, for example, an "if [ -n $xxx_enable ]" test of some kind. >Release-Note: >Audit-Trail: >Unformatted: