Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 2009 19:14:18 GMT
From:      Alex Kozlov <spam@rm-rf.kiev.ua>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/133666: [patch] net-mgmt/nagios silence config check warning
Message-ID:  <200904121914.n3CJEIj1094497@www.freebsd.org>
Resent-Message-ID: <200904121920.n3CJK3oP056064@freefall.freebsd.org>

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

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



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