cfg_dir directory recursion

Andreas Ericsson ae at op5.se
Mon Feb 21 22:02:17 CET 2005


Daniel maher wrote:
> Just for reference, I compiled your app on a Debian-testing platform,
> and it didn't even produce a single error.  Works as advertised. :)
> 

Umkay. I'll put it at oss.op5.se in case anyone needs it for something, 
although I can't for the life of me imagine why.

> 
> Daniel Maher System Engineer ACE TECHNOLOGY INC.
> 
> 
> 
> -----Original Message----- From: Andreas Ericsson [mailto:ae at op5.se]
>  Sent: February 21, 2005 12:12 PM To:
> nagios-users at lists.sourceforge.net Subject: Re: [Nagios-users]
> cfg_dir directory recursion
> 
> Bryan Loniewski wrote:
> 
>>> Compile this attached program and run it with getnagioscfg <your
>>> nagios.cfg file> If it spits out every file you think should be
>>> included I'll get a patch for nagios.
>> 
>> 
>> Does not spit out anything...
>> 
>> bash-2.05# ./getnagioscfg nagios.cfg bash-2.05#
>> 
> 
> 
> Is that the complete path to your nagios.cfg file? That's what you
> have to give, anyways. I didn't put much effort into it, considering
> it's rather stupid and has the life expectancy normally associated
> with glittery insects hovering over trout streams in the summer.
> 
> 
>> exit code is 0 and if I don't give an argument it prints usage, so
>> it does run?
>> 
>> 
>> 
>>> Compile with; gcc getnagioscfg.c -o getnagioscfg
>> 
>> 
>> Compiled... but with warnings:
>> 
>> bash-2.05#  gcc getnagioscfg.c -o getnagioscfg getnagioscfg.c: In
>> function `read_strip_split': getnagioscfg.c:52: warning: comparison
>> between pointer and integer getnagioscfg.c:57: warning: assignment
>> makes integer from pointer without a cast
>> 
> 
> 
> For a 5 minute hack, that's pretty good.
> 
> 
>>> You might have to change header files or something or linking or 
>>> something. I'm not very familiar with solaris.
>> 
>> 
>> Only had to change one header file (err.h > errno.h).
>> 
>> 
>> 
>> My setup looks like...
>> 
>> nagios.cfg: cfg_dir=/usr/local/nagios2/etc/CCF_SC
>> 
>> 
>> bash-2.05# pwd /usr/local/nagios2/etc
>> 
>> bash-2.05# ls -dl CCF_SC/ drwxr-xr-x   4 nagios   nagios       512
>> Feb 18 11:30 CCF_SC/
>> 
>> bash-2.05# ls -dl CCF_SC/ccf/ drwxr-xr-x   2 nagios   nagios
>> 512 Feb 18 11:17 CCF_SC/ccf/
>> 
>> bash-2.05# ls -dl CCF_SC/ccf/ccf.cfg -rw-r--r--   1 nagios   nagios
>> 9518 Feb 18 11:06 CCF_SC/ccf/ccf.cfg
>> 
> 
> 
> Should find that without a problem. Is that your only configuration
> file?
> 
> 
>> ------------------------------------------------------- SF email is
>> sponsored by - The IT Product Guide Read honest & candid reviews on
>> hundreds of IT Products from real users. Discover which products
>> truly live up to the hype. Start reading now. 
>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click 
>> _______________________________________________ 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
>> 
> 
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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