This is a multi-part message in MIME format.
------=_NextPart_000_0058_01C47BB4.451D62E0
Content-Type: text/plain;
format=flowed;
charset="iso-8859-1";
reply-type=original
Content-Transfer-Encoding: 7bit
Currently the spec build it so that nagios writes its pid to a file in the
/var/run directory. This causes nagios to fail on some systems as the
nagios user doesn't have rights to write to that directory. The submitted
patch fixes this by creating a directory /var/run/nagios and grants
ownership of this directory to nagios. It then instructs nagios to write
the pid file to this directory.
-Shad
------=_NextPart_000_0058_01C47BB4.451D62E0
Content-Type: application/octet-stream;
name="spec.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="spec.patch"
--- /root/nagios/nagios/nagios.spec 2004-08-06 10:53:17.000000000 -0600=0A=
+++ nagios.spec 2004-08-06 11:31:00.000000000 -0600=0A=
@@ -190,7 +190,7 @@=0A=
--with-init-dir=3D/etc/init.d \=0A=
--with-cgiurl=3D/nagios/cgi-bin \=0A=
--with-htmurl=3D/nagios \=0A=
- --with-lockfile=3D/var/run/nagios.pid \=0A=
+ --with-lockfile=3D/var/run/nagios/nagios.pid \=0A=
--with-nagios-user=3D%{nsusr} \=0A=
--with-nagios-grp=3D%{nsgrp} \=0A=
--prefix=3D%{_prefix} \=0A=
@@ -247,6 +247,9 @@=0A=
make DESTDIR=3D${RPM_BUILD_ROOT} INSTALL_OPTS=3D"" COMMAND_OPTS=3D"" =
install=0A=
make DESTDIR=3D${RPM_BUILD_ROOT} INSTALL_OPTS=3D"" COMMAND_OPTS=3D"" =
INIT_OPTS=3D"" install-daemoninit=0A=
=0A=
+# create lock directory=0A=
+install -c -m 775 -d ${RPM_BUILD_ROOT}/var/run/nagios=0A=
+=0A=
# install templated configuration files=0A=
cd sample-config=0A=
for f in {nagios,cgi}.cfg ; do=0A=
@@ -310,6 +313,7 @@=0A=
%defattr(640,root,%{nsgrp})=0A=
%config(noreplace) /etc/nagios/private/resource.cfg=0A=
%defattr(755,%{nsusr},%{nsgrp})=0A=
+%dir /var/run/nagios=0A=
%dir /var/log/nagios=0A=
%dir /var/log/nagios/archives=0A=
%defattr(2775,%{nsusr},%{nsgrp})=0A=
------=_NextPart_000_0058_01C47BB4.451D62E0--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]