packages: nagios-plugins/nagios-plugins.spec - not all plugins config conta...
glen
glen at pld-linux.org
Mon Sep 7 17:27:45 CEST 2009
Author: glen Date: Mon Sep 7 15:27:45 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- not all plugins config contain checks for same plugin
---- Files affected:
packages/nagios-plugins:
nagios-plugins.spec (1.111 -> 1.112)
---- Diffs:
================================================================
Index: packages/nagios-plugins/nagios-plugins.spec
diff -u packages/nagios-plugins/nagios-plugins.spec:1.111 packages/nagios-plugins/nagios-plugins.spec:1.112
--- packages/nagios-plugins/nagios-plugins.spec:1.111 Mon Sep 7 17:22:17 2009
+++ packages/nagios-plugins/nagios-plugins.spec Mon Sep 7 17:27:40 2009
@@ -608,6 +608,9 @@
cp -a gl/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/gl
cp -a lib/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/lib
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+cp -a commands/*.cfg $RPM_BUILD_ROOT%{_sysconfdir}
+
%find_lang %{name}
# all files with exec permissions are plugins.
@@ -632,12 +635,10 @@
%{__sed} -i -e 's,use lib "%{_pluginarchdir}",use lib "%{_pluginlibdir}",' $RPM_BUILD_ROOT%{_pluginlibdir}/check_*
%endif
-install -d $RPM_BUILD_ROOT%{_sysconfdir}
-for file in commands/*.cfg; do
- cfg=${file##*/}
- plugin=${cfg%.cfg}
+plugins=$(grep -Eoh 'command_line.*USER1\$/[^ ]+' $RPM_BUILD_ROOT%{_sysconfdir}/*.cfg | awk -F/ '{print $NF}' | sort -u)
+for plugin in $plugins; do
[ -x $RPM_BUILD_ROOT%{_pluginarchdir}/$plugin ] && libdir=%{_pluginarchdir} || libdir=%{_pluginlibdir}
- sed -e "s,\\\$USER1\\\$,$libdir," $file > $RPM_BUILD_ROOT%{_sysconfdir}/$cfg
+ sed -i -e "s,\\\$USER1\\\$,$libdir," $RPM_BUILD_ROOT%{_sysconfdir}/*.cfg
done
cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_pluginlibdir}/utils.php
@@ -920,6 +921,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.112 2009/09/07 15:27:40 glen
+- not all plugins config contain checks for same plugin
+
Revision 1.111 2009/09/07 15:22:17 glen
- adjust lib64 paths for plugins
- nagios-plugin-check_mailq (separated from -perl)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugins/nagios-plugins.spec?r1=1.111&r2=1.112&f=u
More information about the pld-cvs-commit
mailing list