cfg_dir directory recursion
Bryan Loniewski
brylon at jla.rutgers.edu
Mon Feb 21 17:37:59 CET 2005
>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#
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
>
>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
-------------------------------------------------------
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