[Nagios-devel] nrpe patch

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] nrpe patch

Post by Guest »

Small patch to more descriptively log errors opening nrpe config file
(from "nrpe config errors" thread at nagios-users):


--- nrpe.c Tue Mar 19 15:58:25 2002
+++ nrpe.c.patched Tue Mar 19 15:57:31 2002
@@ -193,8 +193,10 @@
fp=3Dfopen(filename,"r");

/* exit if we couldn't open the config file */
- if(fp=3D=3DNULL)
- return ERROR;
+ if(fp=3D=3DNULL){
+ syslog(LOG_ERR,"unable to open config file '%s'\n",filename);
+ return ERROR;
+ }

line=3D0;
while(fgets(input_buffer,MAX_INPUT_BUFFER-1,fp)){






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: jason@eprize.net
Locked