Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 2008 19:44:58 GMT
From:      olli hauer <ohauer@gmx.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/129485: [patch] net-mgmt/ndoutil rc script
Message-ID:  <200812071944.mB7Jiw8c033418@www.freebsd.org>
Resent-Message-ID: <200812071950.mB7Jo3HF082779@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812071944.mB7Jiw8c033418>