[Nagios-devel] Nagios 1.0a2 patches to run on Solaris

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Nagios 1.0a2 patches to run on Solaris

Post by Guest »

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C1A296.E875C170
Content-Type: text/plain;
charset="iso-8859-1"

The following patch will get Nagios up and running on Solaris

- Solaris lacks scandir and alphasort
- convertcfg needs my_strsep

And also a few enhancements that people have requested of me:

- "make install-config" won't clobber live config files
- "daemon-init reload" had a reversed test
- With a passive service check, if Nagios can't resolve the hostname it
will try resolving it as an IP address. Useful for dealing with equipment
having no DNS entries :-(
- a "telnet:HOSTNAME" link is created in the host and service detail pages.
This should really be driven by an optional parameter in the extended host
information definition. I'll see what I can do about that.
>
--
Tom Bertelson "Any sufficient advanced technlogy
GE Card Services is indistinguishable from magic."
tbertels@iname.com -- Arthur C. Clarke


------_=_NextPart_000_01C1A296.E875C170
Content-Type: application/octet-stream;
name="solaris.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="solaris.patch"

--- Makefile.in.orig Sat Dec 15 14:28:43 2001=0A=
+++ Makefile.in Mon Jan 21 10:44:43 2002=0A=
@@ -129,9 +129,9 @@=0A=
=0A=
install-config:=0A=
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)=0A=
- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg =
$(DESTDIR)$(CFGDIR)=0A=
- $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg =
$(DESTDIR)$(CFGDIR)=0A=
- $(INSTALL) -m 660 $(INSTALL_OPTS) sample-config/resource.cfg =
$(DESTDIR)$(CFGDIR)=0A=
+ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/nagios.cfg =
$(DESTDIR)$(CFGDIR)/nagios.cfg-sample=0A=
+ $(INSTALL) -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg =
$(DESTDIR)$(CFGDIR)/cgi.cfg-sample=0A=
+ $(INSTALL) -m 660 $(INSTALL_OPTS) sample-config/resource.cfg =
$(DESTDIR)$(CFGDIR)/resource.cfg-sample=0A=
=0A=
install-init: install-daemoninit=0A=
=0A=
--- base/Makefile.in.orig Thu Dec 13 17:18:29 2001=0A=
+++ base/Makefile.in Fri Jan 18 19:04:23 2002=0A=
@@ -49,11 +49,14 @@=0A=
XFDC=3D@XFDC@=0A=
XFDH=3D@XFDH@=0A=
=0A=
+SCANDIR_O=3D@SCANDIR_O@=0A=
+ALPHASORT_O=3D@ALPHASORT_O@=0A=
+=0A=
# Extra base code=0A=
BASEEXTRALIBS=3D@BASEEXTRALIBS@=0A=
=0A=
# Object data=0A=
-ODATALIBS=3D$(SRC_COMMON)/objects.c $(SRC_XDATA)/$(XODC)=0A=
+ODATALIBS=3D$(SRC_COMMON)/objects.c $(SRC_XDATA)/$(XODC) $(SCANDIR_O) =
$(ALPHASORT_O)=0A=
ODATAHDRS=3D$(SRC_COMMON)/objects.h $(SRC_XDATA)/$(XODH)=0A=
ODATADEPS=3D$(ODATALIBS)=0A=
=0A=
--- base/commands.c.orig Thu Dec 20 20:34:51 2001=0A=
+++ base/commands.c Fri Jan 18 19:04:23 2002=0A=
@@ -1185,6 +1185,7 @@=0A=
char *temp_ptr;=0A=
passive_check_result *new_pcr;=0A=
passive_check_result *temp_pcr;=0A=
+ host *temp_host;=0A=
=0A=
#ifdef DEBUG0=0A=
printf("cmd_process_service_check_result() start\n");=0A=
@@ -1196,6 +1197,15 @@=0A=
=0A=
/* get the host name */=0A=
temp_ptr=3Dmy_strtok(args,";");=0A=
+ if (find_host(temp_ptr,NULL)=3D=3DNULL) {=0A=
+ /* Maybe we have an IP address? */=0A=
+ =
for(temp_host=3Dhost_list;temp_host!=3DNULL;temp_host=3Dtemp_host->next)=
{=0A=
+ if(!strcmp(temp_ptr,temp_host->address)){=0A=
+ temp_ptr=3Dtemp_host->name;=0A=
+ break;=0A=
+ }=0A=
+ }=0A=
+ }=0A=
if(temp_ptr=3D=3DNULL){=0A=
free(new_pcr);=0A=
return ERROR;=0A=
--- cgi/Makefile.in.orig Sun Dec 23 15:04:45 2001=0A=
+++ cgi/Makefile.in Fri Jan 18 19:04:23 2002=0A=
@@ -42,8 +42,11 @@=0A=
XDDC=3D@XDDC@=0A=
XDDH=3D@XDDH@=0A=
=0A=
+SCANDIR_O=3D@SCANDIR_O@=0A=
+ALPHASORT_O=3D@ALPHASORT_O@=0A=
+=0A=
# Object functions=0A=
-ODATALIBS=3D$(SRC_COMMON)/objects.c $(SRC_XDATA)/$(XODC)=0A=
+ODATALIBS=3D$(SRC_COMMON)/objects.c $(SRC_XDATA)/$(XODC) $(SCANDIR_O) =
$(ALPHASORT_O)=0A=
ODATAHDRS=3D$(SRC_COMMON)/objects.h $(SRC_XDATA)/$(XODH)=0A=
ODATADEPS=3D$(ODATALIBS)=0A=
=0A=
--- cgi/cgiutils.c.orig Mon Jan 14 20:57:55 2002=0A=
+++ cgi/cgiutils.c Fri Jan 18 19:04:23 20

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: Tom.Bertelson@gecapital.com
Locked