From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Dec 7 19:50:04 2008 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 1AF96106564A for ; Sun, 7 Dec 2008 19:50:04 +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 EB6DE8FC60 for ; Sun, 7 Dec 2008 19:50: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 mB7Jo3oh082780 for ; Sun, 7 Dec 2008 19:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mB7Jo3HF082779; Sun, 7 Dec 2008 19:50:03 GMT (envelope-from gnats) Resent-Date: Sun, 7 Dec 2008 19:50:03 GMT Resent-Message-Id: <200812071950.mB7Jo3HF082779@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, olli hauer Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A3A21065680 for ; Sun, 7 Dec 2008 19:44:58 +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 68A438FC13 for ; Sun, 7 Dec 2008 19:44:58 +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 mB7Jiwa0033419 for ; Sun, 7 Dec 2008 19:44:58 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mB7Jiw8c033418; Sun, 7 Dec 2008 19:44:58 GMT (envelope-from nobody) Message-Id: <200812071944.mB7Jiw8c033418@www.freebsd.org> Date: Sun, 7 Dec 2008 19:44:58 GMT From: olli hauer To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/129485: [patch] net-mgmt/ndoutil rc script 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, 07 Dec 2008 19:50:04 -0000 >Number: 129485 >Category: ports >Synopsis: [patch] net-mgmt/ndoutil rc script >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 Dec 07 19:50:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: olli hauer >Release: >Organization: >Environment: >Description: The rc script for the ndoutil does not work. ndo2db config file is /usr/local/etc/nagios/ndo2db.cfg not nagios.cfg the binary name is ndo2db-3x not ndo2db load_rc_config $name is executed before the default vars are set >How-To-Repeat: cd /usr/ports/net-mgmt/ndoutils make install # set this vars in rc.conf.local, they will be ignored ndo2db_enable="YES" ndo2db_configfile="/usr/local/etc/nagios/ndo2db.cfg" >Fix: Patch attached with submission follows: --- ndo2db.in 2008/12/07 19:28:56 1.1 +++ ndo2db.in 2008/12/07 19:32:54 @@ -10,20 +10,19 @@ # Add the following lines to /etc/rc.conf to enable ndo2db: # ndo2db_enable (bool): Set to "NO" by default. # ndo2db_flags (str): Set to "" by default. -# ndo2db_configfile (str): Set to "%%PREFIX%%/etc/nagios/nagios.cfg" by default. +# ndo2db_configfile (str): Set to "%%PREFIX%%/etc/nagios/ndo2db.cfg" by default. + +: ${ndo2db_enable="NO"} +: ${ndo2db_configfile="%%PREFIX%%/etc/nagios/ndo2db.cfg"} . %%RC_SUBR%% name="ndo2db" rcvar=${name}_enable -command="%%PREFIX%%/bin/${name}" +command="%%PREFIX%%/bin/ndo2db-3x" required_files="${ndo2db_configfile}" command_args="-c ${ndo2db_configfile}" load_rc_config $name - -: ${ndo2db_enable=-NO} -: ${ndo2db_configfile=-%%PREFIX%%/etc/nagios/nagios.cfg} - run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: