Re: [Nagios-devel] sugested update for location.h.in

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

Re: [Nagios-devel] sugested update for location.h.in

Post by Guest »

On Thu, Oct 14, 2010 at 10:56:56AM +0200, Andreas Ericsson wrote:
> On Wed, Oct 13, 2010 at 9:47 PM, Marcel J.E. Mol wrote=
:
> > Hello,
> >
> > My first post to the list... I just started playing with nagios and d=
oing
> > some test developments. For this I need the location of the directory
> > where all config files reside. I noticed that all config files are de=
fined
> > with absolute paths and the config directory itself is not defined.
> >
> > It like to suggest a change to location.h.in so I can define new conf=
ig
> > files within a single source file without needing to update other nag=
ios
> > core files. =C2=A0The patch is attached. It just adds a DEFAULT_CONFI=
G_DIR
> > define to location.h.in.
> >
>=20
> The default value for that macro would cause Nagios to recursively sear=
ch
> all of /etc for files ending with .cfg.

I think you mistake this with the runtime definition with of cfg_dir in
nagios.cfg.

The suggested define in location.in.h is only a compile time
definition. It allows me to create new source files, say myproject.c
and in it do something like

fp =3D open(DEFAULT_CONFIG_DIR "myproject.cfg");

without tampering other nagios source files while being flexible at where
the config files reside. In the current situation I need to create a
file that is processed by the configure step to set the correct place
for config files.

> Try the cfg_dir option in nagios.cfg instead. It should do roughly what=
you
> want.

So it has nothing to do with cfg_dir...


-Marcel
--=20
=3D=3D=3D=3D=3D=3D-------- Marcel J.E. Mol ME=
SA Consulting B.V.
=3D=3D=3D=3D=3D=3D=3D--------- ph. +31-(0)6-54724868 =
P.O. Box 112
=3D=3D=3D=3D=3D=3D=3D--------- [email protected] =
2630 AC Nootdorp
__=3D=3D=3D=3D www.mesa.nl ---____U_n_i_x______I_n_t_e_r_n_e_t____ The Ne=
therlands ____
They couldn't think of a number, Linux user 1148 -- counter.=
li.org
so they gave me a name! -- Rupert Hine -- www.ruperthine.com





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked