diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-03-24 06:28:46 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-03-24 06:28:46 +0000 |
commit | dce143e354da414bdd5fa5fb0b9b488ac4221200 (patch) | |
tree | 711692d7c885caa1ea2556a1f86cf0b917a93fdd /lib/parse_ini.h | |
parent | 3419b16cc87380a111835a8c8af2d006482aee75 (diff) | |
download | monitoring-plugins-dce143e354da414bdd5fa5fb0b9b488ac4221200.tar.gz |
Replace broken usage of NAGIOS_CONFIG_PATH with a stub function (that will try to find a config file in the future...)
Allow NULL locator (default file/section)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1960 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib/parse_ini.h')
-rw-r--r-- | lib/parse_ini.h | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/lib/parse_ini.h b/lib/parse_ini.h index fea745c5..61149a21 100644 --- a/lib/parse_ini.h +++ b/lib/parse_ini.h @@ -13,10 +13,43 @@ typedef struct np_arg_el { struct np_arg_el *next; } np_arg_list; -/* NP_DEFAULT_INI_PATH: compile-time default location for ini file */ +/* NP_DEFAULT_INI_PATH: compile-time default location for ini file #ifndef NP_DEFAULT_INI_PATH -# define NP_DEFAULT_INI_PATH "/etc/nagios-plugins/plugins.ini" -#endif /* NP_DEFAULT_INI_PATH */ +# define NP_DEFAULT_INI_PATH "/etc/nagios-plugins.ini" +#endif NP_DEFAULT_INI_PATH */ + +/* Filenames (see below) */ +#ifndef NP_DEFAULT_INI_FILENAME1 +# define NP_DEFAULT_INI_FILENAME1 "plugins.ini" +#endif /* NP_DEFAULT_INI_FILENAME1 */ +#ifndef NP_DEFAULT_INI_FILENAME2 +# define NP_DEFAULT_INI_FILENAME2 "nagios-plugins.ini" +#endif /* NP_DEFAULT_INI_FILENAME2 */ + +/* Config paths ending in nagios (search for NP_DEFAULT_INI_FILENAME1) */ +#ifndef NP_DEFAULT_INI_NAGIOS_PATH1 +# define NP_DEFAULT_INI_NAGIOS_PATH1 "/etc/nagios" +#endif /* NP_DEFAULT_INI_NAGIOS_PATH1 */ +#ifndef NP_DEFAULT_INI_NAGIOS_PATH2 +# define NP_DEFAULT_INI_NAGIOS_PATH2 "/usr/local/nagios/etc" +#endif /* NP_DEFAULT_INI_NAGIOS_PATH2 */ +#ifndef NP_DEFAULT_INI_NAGIOS_PATH3 +# define NP_DEFAULT_INI_NAGIOS_PATH3 "/usr/local/etc/nagios" +#endif /* NP_DEFAULT_INI_NAGIOS_PATH3 */ +#ifndef NP_DEFAULT_INI_NAGIOS_PATH4 +# define NP_DEFAULT_INI_NAGIOS_PATH4 "/etc/opt/nagios" +#endif /* NP_DEFAULT_INI_NAGIOS_PATH4 */ + +/* Config paths not ending in nagios (search for NP_DEFAULT_INI_FILENAME2) */ +#ifndef NP_DEFAULT_INI_PATH1 +# define NP_DEFAULT_INI_PATH1 "/etc" +#endif /* NP_DEFAULT_INI_PATH1 */ +#ifndef NP_DEFAULT_INI_PATH2 +# define NP_DEFAULT_INI_PATH2 "/usr/local/etc" +#endif /* NP_DEFAULT_INI_PATH2 */ +#ifndef NP_DEFAULT_INI_PATH3 +# define NP_DEFAULT_INI_PATH3 "/etc/opt" +#endif /* NP_DEFAULT_INI_PATH3 */ /* np_load_defaults: load the default configuration (if present) for * a plugin from the ini file |