Date: Wed, 18 May 2005 22:32:08 +0200 (CEST) From: Blaz Zupan <blaz@si.FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/81220: MAINTAINER UPDATE: net-mgmt/nagios Message-ID: <20050518203208.B732155475@titanic.medinet.si> Resent-Message-ID: <200505182040.j4IKe3xp057402@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 81220 >Category: ports >Synopsis: MAINTAINER UPDATE: net-mgmt/nagios >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed May 18 20:40:03 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Blaz Zupan >Release: FreeBSD 4.10-RELEASE i386 >Organization: >Environment: System: FreeBSD titanic.medinet.si 4.10-RELEASE FreeBSD 4.10-RELEASE #1: Sun Jun 27 16:39:26 CEST 2004 root@bigbrother.amis.net:/usr/obj/usr/src/sys/TITANIC i386 >Description: Check validity of configurations files in the startup script. Submitted by: Artem Naluzhny <tut@nhamon.com.ua> >How-To-Repeat: >Fix: diff -urN nagios.old/Makefile nagios/Makefile --- nagios.old/Makefile Tue Apr 5 19:17:52 2005 +++ nagios/Makefile Wed May 18 22:27:53 2005 @@ -7,6 +7,7 @@ PORTNAME= nagios PORTVERSION= 2.0.b3 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=nagios diff -urN nagios.old/files/nagios.sh.tmpl nagios/files/nagios.sh.tmpl --- nagios.old/files/nagios.sh.tmpl Mon Feb 14 22:52:42 2005 +++ nagios/files/nagios.sh.tmpl Wed May 18 22:27:33 2005 @@ -34,14 +34,30 @@ start_precmd=start_precmd stop_postcmd=stop_postcmd +restart_precmd=nagios_checkconfig # set defaults nagios_enable=${nagios_enable:-"NO"} nagios_flags=${nagios_flags:-""} +nagios_checkconfig() +{ + echo -n 'Performing sanity check on Nagios configuration: ' + $NagiosBin -v $NagiosCfg > /dev/null 2>&1 + if [ $? != 0 ]; then + echo 'FAILED.' + echo "Use '$NagiosBin -v $NagiosCfg' command for details." + return 1 + else + echo 'OK.' + fi +} + start_precmd() { + nagios_checkconfig; [ $? != 0 ] && return 1 + su -m ${nagios_user} -c "touch ${NagiosVar}/nagios.log ${NagiosSav}" rm -f ${NagiosCmd} } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050518203208.B732155475>