------=_Part_159715_32403916.1231382696679
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
The spec file does not install the sample configuration files to
/etc/nagios/objects. The default /etc/nagios/nagios.cfg references these
non-existent files.
Patch below adds the files to the rpm.
~Matt
> diff -U3 nagios.spec.orig nagios.spec
--- nagios.spec.orig 2009-01-06 20:51:06.000000000 -0500
+++ nagios.spec 2009-01-06 20:50:35.000000000 -0500
@@ -243,6 +243,7 @@
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/logrotate.d
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/httpd/conf.d
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios
+install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios/objects
### install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios/private
make DESTDIR=${RPM_BUILD_ROOT} INSTALL_OPTS="" COMMAND_OPTS="" install
make DESTDIR=${RPM_BUILD_ROOT} INSTALL_OPTS="" COMMAND_OPTS="" INIT_OPTS=""
install-daemoninit
@@ -257,9 +258,9 @@
[ -f $f ] && install -c -m 664 $f ${RPM_BUILD_ROOT}/etc/nagios/${f}
done
cd template-object
-for f in
{hosts,hostgroups,services,contacts,contactgroups,dependencies,escalations,timeperiods,checkcommands,misccommands,minimal}.cfg
+for f in {commands,contacts,localhost,switch,templates,timeperiods}.cfg
do
- [ -f $f ] && install -c -m 664 $f ${RPM_BUILD_ROOT}/etc/nagios/${f}
+ [ -f $f ] && install -c -m 664 $f
${RPM_BUILD_ROOT}/etc/nagios/objects/${f}
done
cd ..
cd ..
@@ -304,8 +305,10 @@
%{_prefix}/lib/nagios/eventhandlers/*
%{_sbindir}/convertcfg
%dir /etc/nagios
+%dir /etc/nagios/objects
%defattr(644,root,root)
%config(noreplace) /etc/nagios/*.cfg
+%config(noreplace) /etc/nagios/objects/*.cfg
%defattr(750,root,%{nsgrp})
###%dir /etc/nagios/private
%defattr(640,root,%{nsgrp})
------=_Part_159715_32403916.1231382696679
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
The spec file does not install the sample configuration files to /etc/nagios/objects. The default /etc/nagios/nagios.cfg references these non-existent files.Patch below adds the files to the rpm.
~Matt
> diff -U3 nagios.spec.orig nagios.spec--- nagios.spec.orig 2009-01-06 20:51:06.000000000 -0500+++ nagios.spec 2009-01-06 20:50:35.000000000 -0500@@ -243,6 +243,7 @@ install -d -m 0755 ${RPM_BUILD_ROOT}/etc/logrotate.d
install -d -m 0755 ${RPM_BUILD_ROOT}/etc/httpd/conf.d install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios+install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios/objects ### install -d -m 0755 ${RPM_BUILD_ROOT}/etc/nagios/private
make DESTDIR=${RPM_BUILD_ROOT} INSTALL_OPTS="" COMMAND_OPTS="" install make DESTDIR=${RPM_BUILD_ROOT} INSTALL_OPTS="" COMMAND_OPTS="" INIT_OPTS="" install-daemoninit
@@ -257,9 +258,9 @@ [ -f $f ] && install -c -m 664 $f ${RPM_BUILD_ROOT}/etc/nagios/${f} done cd template-object-for f in {hosts,hostgroups,services,contacts,contactgroups,dependencies,escalations,timeperiods,checkcommands,misccommands,minimal}.cfg
+for f in {commands,contacts,localhost,switch,templates,timeperiods}.cfg do- [ -f $f ] && install -c -m 664 $f ${RPM_BUILD_ROOT}/etc/nagios/${f}+ [ -f $f ] && install -c -m 664 $f ${RPM_BUILD_ROOT}/etc/nagios/objects/${f}
done cd .. cd ..@@ -304,8 +305,10 @@ %{_prefix}/lib/nagios/eventhandlers/* %{_sbindir}/convertcfg %dir /etc/nagios+%dir /etc/nagios/objects %defattr(644,root,root) %config(noreplace) /etc/nagios/*.cfg
+%config(noreplace) /etc/nagios/objects/*.cfg %defattr(750,root,%{nsgrp}) ###%dir /etc/nagios/private %defattr(640,root,%{nsgrp})
------=_Part_159715_32403916.1231382696679--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]