ports/129485: [patch] net-mgmt/ndoutil rc script

olli hauer ohauer at gmx.de
Sun Dec 7 19:50:04 UTC 2008


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



More information about the freebsd-ports-bugs mailing list