packages: nagios-merlin/merlind.init, nagios-merlin/nagios-merlin.spec - ch...
glen
glen at pld-linux.org
Tue Dec 7 15:37:18 CET 2010
Author: glen Date: Tue Dec 7 14:37:18 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- check broker_module presence in nagios config
---- Files affected:
packages/nagios-merlin:
merlind.init (1.3 -> 1.4) , nagios-merlin.spec (1.3 -> 1.4)
---- Diffs:
================================================================
Index: packages/nagios-merlin/merlind.init
diff -u packages/nagios-merlin/merlind.init:1.3 packages/nagios-merlin/merlind.init:1.4
--- packages/nagios-merlin/merlind.init:1.3 Tue Dec 7 15:20:20 2010
+++ packages/nagios-merlin/merlind.init Tue Dec 7 15:37:13 2010
@@ -34,12 +34,30 @@
daemon=/usr/sbin/merlind
pidfile="/var/run/merlind.pid"
config_file=/etc/nagios/merlin.conf
+nagios_cfg=/etc/nagios/nagios.cfg
+broker_module=/usr/lib/nagios/merlin/merlin.so
# configtest itself
# must return non-zero if check failed
# output is discarded if checkconfig is ran without details
configtest() {
local val ret=0
+
+ # check Nagios setup
+ val=$(awk -F= '/^broker_module=.*merlin.so/{print $2}' $nagios_cfg)
+ val=${val% *}
+ if [ -z "$val" ]; then
+ echo >&2 "'broker_module' does not contain merlin.so in $nagios_cfg"
+ echo >&2 "Add to Nagios config:"
+ echo >&2 "broker_module=$broker_module $config_file"
+ ret=1
+ fi
+
+ # check that it exists
+ if [ -n "$val" -a ! -f "$val" ]; then
+ echo >&2 "broker_module $val does not exist, try setting it to $broker_module"
+ ret=1
+ fi
return $ret
}
================================================================
Index: packages/nagios-merlin/nagios-merlin.spec
diff -u packages/nagios-merlin/nagios-merlin.spec:1.3 packages/nagios-merlin/nagios-merlin.spec:1.4
--- packages/nagios-merlin/nagios-merlin.spec:1.3 Tue Dec 7 15:12:43 2010
+++ packages/nagios-merlin/nagios-merlin.spec Tue Dec 7 15:37:13 2010
@@ -2,7 +2,7 @@
Summary: Merlin: Module for Effortless Redundancy and Loadbalancing In Nagios
Name: nagios-merlin
Version: 0.9.0
-Release: 0.2
+Release: 0.3
License: GPL v2
Group: Networking
Source0: http://www.op5.org/op5media/op5.org/downloads/merlin-%{version}.tar.gz
@@ -14,8 +14,8 @@
BuildRequires: libdbi-devel
BuildRequires: rpmbuild(macros) >= 1.228
BuildRequires: sed >= 4.0.9
-Requires: nagios >= 3.2.4
Requires(post,preun): /sbin/chkconfig
+Requires: nagios >= 3.2.4
Requires: rc-scripts
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -62,6 +62,7 @@
install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/merlind
+sed -i -e 's,/usr/lib/nagios/merlin,%{_appdir},' $RPM_BUILD_ROOT/etc/rc.d/init.d/merlind
install -d $RPM_BUILD_ROOT%{_sbindir}
mv $RPM_BUILD_ROOT{%{_appdir},%{_sbindir}}/merlind
@@ -92,6 +93,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.4 2010/12/07 14:37:13 glen
+- check broker_module presence in nagios config
+
Revision 1.3 2010/12/07 14:12:43 glen
- move daemon to sbindir
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-merlin/merlind.init?r1=1.3&r2=1.4&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-merlin/nagios-merlin.spec?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list