From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Apr 12 19:20:03 2009 Return-Path: Delivered-To: freebsd-ports-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 B8B0A1065679 for ; Sun, 12 Apr 2009 19:20:03 +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 790A28FC26 for ; Sun, 12 Apr 2009 19:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3CJK3Yk056072 for ; Sun, 12 Apr 2009 19:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3CJK3oP056064; Sun, 12 Apr 2009 19:20:03 GMT (envelope-from gnats) Resent-Date: Sun, 12 Apr 2009 19:20:03 GMT Resent-Message-Id: <200904121920.n3CJK3oP056064@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Kozlov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA4891065A26 for ; Sun, 12 Apr 2009 19:14:18 +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 924848FC21 for ; Sun, 12 Apr 2009 19:14:18 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3CJEIL5094498 for ; Sun, 12 Apr 2009 19:14:18 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n3CJEIj1094497; Sun, 12 Apr 2009 19:14:18 GMT (envelope-from nobody) Message-Id: <200904121914.n3CJEIj1094497@www.freebsd.org> Date: Sun, 12 Apr 2009 19:14:18 GMT From: Alex Kozlov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/133666: [patch] net-mgmt/nagios silence config check warning X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2009 19:20:04 -0000 >Number: 133666 >Category: ports >Synopsis: [patch] net-mgmt/nagios silence config check warning >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 12 19:20:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Alex Kozlov >Release: >Organization: private >Environment: >Description: Print syntax check warning only in case if syntax check failed. No news is good news. Also minor syntax improvement. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: net-mgmt/nagios/files/nagios.in @@ -33,9 +33,9 @@ reload_precmd="nagios_checkconfig" sig_reload=HUP -[ -z "${nagios_enable}" ] && nagios_enable="NO" -[ -z "${nagios_flags}" ] && nagios_flags="" -[ -z "${nagios_configfile}" ] && nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg" +: ${nagios_enable="NO"} +: ${nagios_flags=""} +: ${nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg"} load_rc_config "${name}" @@ -43,14 +43,11 @@ command_args="${command_args} ${nagios_configfile}" nagios_checkconfig() { - echo -n "Performing sanity check of nagios configuration: " ${command} -v ${nagios_configfile} 2>&1 >/dev/null if [ $? != 0 ]; then - echo "FAILED" + echo "FAILED sanity check of nagios configuration." ${command} -v ${nagios_configfile} return 1 - else - echo "OK" fi } >Release-Note: >Audit-Trail: >Unformatted: