NRPE on Tru64 Alpha

Steve Feehan sfeehan at sbb.uvm.edu
Tue Jan 13 16:17:39 CET 2004


On Tue, Jan 13, 2004 at 09:01:39AM -0500, Steve Feehan wrote:
> On Tue, Jan 13, 2004 at 07:37:05AM -0500, nagios at acmecargo.com wrote:
> > I have 4 Compaq Alpha servers running Tru64. Does anybody know where source 
> > for the NRPE agent might exists for these platforms?
> > 
> > Dylan
> 
> The source is the same for all platforms. I have successfully
> built nrpe for tru64 (5.1a). I recall that it required small
> changes to the source code. I think it was all related to 
> tru64 not having getopt_long.
> 
> Steve

Here's a patch that works for me:


diff -ur nrpe-2.0/src/check_nrpe.c nrpe-2.0-mod/src/check_nrpe.c
--- nrpe-2.0/src/check_nrpe.c	2003-09-08 22:52:37.000000000 -0400
+++ nrpe-2.0-mod/src/check_nrpe.c	2003-12-01 18:00:48.000000000 -0500
@@ -308,7 +308,7 @@
 	int c=1;
 	int i=1;
 
-#ifdef HAVE_GETOPT_H
+/* #ifdef HAVE_GETOPT_H
 	int option_index=0;
 	static struct option long_options[]={
 		{"host", required_argument, 0, 'H'},
@@ -321,7 +321,7 @@
 		{"license", no_argument, 0, 'l'},
 		{0, 0, 0, 0}
                 };
-#endif
+#endif */
 
 	/* no options were supplied */
 	if(argc<2)
@@ -330,11 +330,11 @@
 	snprintf(optchars,MAX_INPUT_BUFFER,"H:c:a:t:p:nhl");
 
 	while(1){
-#ifdef HAVE_GETOPT_H
+/* #ifdef HAVE_GETOPT_H
 		c=getopt_long(argc,argv,optchars,long_options,&option_index);
-#else
+#else */
 		c=getopt(argc,argv,optchars);
-#endif
+/*#endif*/
 		if(c==-1 || c==EOF)
 			break;
 
diff -ur nrpe-2.0/src/nrpe.c nrpe-2.0-mod/src/nrpe.c
--- nrpe-2.0/src/nrpe.c	2003-09-08 22:52:37.000000000 -0400
+++ nrpe-2.0-mod/src/nrpe.c	2003-12-01 18:01:25.000000000 -0500
@@ -1437,7 +1437,7 @@
 	int c=1;
 	int have_mode=FALSE;
 
-#ifdef HAVE_GETOPT_H
+/*#ifdef HAVE_GETOPT_H
 	int option_index=0;
 	static struct option long_options[]={
 		{"config", required_argument, 0, 'c'},
@@ -1448,7 +1448,7 @@
 		{"license", no_argument, 0, 'l'},
 		{0, 0, 0, 0}
                 };
-#endif
+#endif */
 
 	/* no options were supplied */
 	if(argc<2)
@@ -1457,11 +1457,11 @@
 	snprintf(optchars,MAX_INPUT_BUFFER,"c:nidhl");
 
 	while(1){
-#ifdef HAVE_GETOPT_H
+/*#ifdef HAVE_GETOPT_H
 		c=getopt_long(argc,argv,optchars,long_options,&option_index);
-#else
+#else */
 		c=getopt(argc,argv,optchars);
-#endif
+/* #endif */
 		if(c==-1 || c==EOF)
 			break;
 


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list