[packages/nagios-plugin-check_iptables] hook into nrpe.d

glen glen at pld-linux.org
Tue Jan 28 21:22:27 CET 2014


commit 7150e1ba53983d306c6b58af68610e71553bfcb8
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Jan 28 20:22:19 2014 +0000

    hook into nrpe.d

 nagios-plugin-check_iptables.spec | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/nagios-plugin-check_iptables.spec b/nagios-plugin-check_iptables.spec
index a5f7d89..d704b48 100644
--- a/nagios-plugin-check_iptables.spec
+++ b/nagios-plugin-check_iptables.spec
@@ -2,20 +2,23 @@
 Summary:	Nagios plugin to check count of iptables rules
 Name:		nagios-plugin-%{plugin}
 Version:	0.1
-Release:	4
+Release:	5
 License:	GPL v2
 Group:		Networking
 Source0:	%{plugin}.sh
 Source1:	%{plugin}.cfg
-BuildRequires:	rpmbuild(macros) >= 1.552
+BuildRequires:	rpmbuild(macros) >= 1.685
+Requires:	grep
 Requires:	iptables
 Requires:	nagios-common
 Requires:	nagios-plugins-libs
+Requires:	sed >= 4.0
 Requires:	sudo
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_sysconfdir	/etc/nagios/plugins
+%define		nrpeddir	/etc/nagios/nrpe.d
 %define		plugindir	%{_prefix}/lib/nagios/plugins
 
 %description
@@ -27,9 +30,10 @@ cp -p %{SOURCE0} %{plugin}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{nrpeddir},%{plugindir}}
 install -p %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
 sed -e 's, at plugindir@,%{plugindir},' %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
+touch $RPM_BUILD_ROOT%{nrpeddir}/%{plugin}.cfg
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -55,4 +59,5 @@ fi
 %files
 %defattr(644,root,root,755)
 %attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
+%ghost %{nrpeddir}/%{plugin}.cfg
 %attr(755,root,root) %{plugindir}/%{plugin}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_iptables.git/commitdiff/7150e1ba53983d306c6b58af68610e71553bfcb8



More information about the pld-cvs-commit mailing list